krylov123 / var-dump-parser
Parser for PHP var_dump function output
0.0.3
2020-07-31 15:20 UTC
Requires
- php: >=5.6.1
Requires (Dev)
- phpunit/phpunit: ^5
This package is auto-updated.
Last update: 2025-05-29 01:44:36 UTC
README
Parse var_dump's output back to PHP object.
At the moment supports only the plain array (inc. associative, but not multidimensional) and scalar types.
#Example
$string = " /var/www/var-dump-parser/test.php:9: array(3) { 'as' => int(123123) [0] => int(12312321) [1] => int(3123) } "; $parser = new \Krylov123\VarDumpParser(); $array = $parser->parseOutput($string);
Working with versions:
#list all your versions git tag -l #add version git tag -a 0.0.1 -m "First version" #pushing the tags git push --tags
Run tests
composer install ./vendor/bin/phpunit tests