nikic/PHP-Parser — pull request #123 by llaville (2014-08-27 12:35:13+00:00)
Title: add print_r dump operation to bin Script

While I wanted to explore a source code that have at least this source code

```php
$this->$method();
```
I used for the first time the `bin/php-parse.php` script and try to dump contents of nodes with `--var-dump` operation.

It gave me too little info (for my point of view). See output as follow.

==> var_dump():
array(1) {
[0] =>
class PhpParser\Node\Expr\MethodCall#12 (2) {
protected $subNodes =>
array(3) {
'var' =>
class PhpParser\Node\Expr\Variable#13 (2) {
...
}
'name' =>
class PhpParser\Node\Expr\Variable#14 (2) {
...
}
'args' =>
array(0) {
...
}
}
protected $attributes =>
array(2) {
'startLine' =>
int(2)
'endLine' =>
int(2)
}
}
}

I would like to have all details, so I've added a new operation called `--print-r`, that gave me following output

==> print_r():
Array
(
[0] => PhpParser\Node\Expr\MethodCall Object
(
[subNodes:protected] => Array
(
[var] => PhpParser\Node\Expr\Variable Object
(
[subNodes:protected] => Array
(
[name] => this
)

[attributes:protected] => Array
(
[startLine] => 2
[endLine] => 2
)

)

[name] => PhpParser\Node\Expr\Variable Object
(
[subNodes:protected] => Array
(
[name] => method
)

[attributes:protected] => Array
(
[startLine] => 2
[endLine] => 2
)

)

[args] => Array
(
)

)

[attributes:protected] => Array
(
[startLine] => 2
[endLine] => 2
)

)

)