<commit_before># PsySH

[![Build Status](https://travis-ci.org/bobthecow/psysh.png?branch=master)](https://travis-ci.org/bobthecow/psysh)

Check out the [Interactive Debugging in PHP talk from OSCON](https://presentate.com/bobthecow/talks/php-for-pirates) on Presentate.


## Installation

PsySH [is available via Composer](https://packagist.org/packages/psy/psysh), or you can use it directly from this repository:

```
git clone https://github.com/bobthecow/psysh.git
cd psysh
./bin/psysh
```

But by far the easiest way to use it is to download the precompiled phar:

```
wget psysh.org/psysh
chmod +x psysh
./psysh
```


## PsySH configuration

While PsySH strives to detect the right settings automatically, you might want to configure it yourself. Just add a file to `~/.psysh/rc.php`:

```php
<?php

return array(
    // In PHP 5.4+, PsySH will default to your `cli.pager` ini setting. If this
    // is not set, it falls back to `less`. It is recommended that you set up
    // `cli.pager` in your `php.ini` with your preferred output pager.
    // <commit_msg>Add composer global instructions<commit_after># PsySH

[![Build Status](https://travis-ci.org/bobthecow/psysh.png?branch=master)](https://travis-ci.org/bobthecow/psysh)

Check out the [Interactive Debugging in PHP talk from OSCON](https://presentate.com/bobthecow/talks/php-for-pirates) on Presentate.


## Installation

PsySH [is available via Composer](https://packagist.org/packages/psy/psysh), so you can use it in your project, or install it globally like this:

```
composer global require psy/psysh:dev-master
```

If this is your first time installing something globally with Composer, [make sure you have your path set up correctly](http://getcomposer.org/doc/03-cli.md#global).

Or you can use by checking out the the repository directly:

```
git clone https://github.com/bobthecow/psysh.git
cd psysh
./bin/psysh
```

But by far the easiest way to use it is to download the precompiled phar:

```
wget psysh.org/psysh
chmod +x psysh
./psysh
```


## PsySH configuration

While PsySH strives to detect the right settings automatically, you might want to configure it yourself. Just add a file to `~/.psysh/rc.php`:

```php
<?php

return array(
    // In PHP 5.4+, PsySH will default to your `cli.pager` ini setting. If this
    // is not set, it falls back to `less`. It is recommended that you set up
    // `cli.pager` in your `php.ini` with your preferred output pager.
    // 
{'fraction_non_alphanumeric': 0.11712078080520537, 'fraction_numerical': 0.0024400162667751117, 'mean_word_length': 3.871287128712871, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2291743', 'n_tokens_mistral': 823, 'n_tokens_neox': 823, 'n_words': 289}