PHP var_dump / print_r parser
Given a variable, the PHP function print_r
(or var_dump
) will print human-readable information about the variable. This is best illustrated with an example:
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
print_r ($a);
will output:
Array
(
[a] => apple
[b] => banana
[c] => Array
(
[0] => x
[1] => y
[2] => z
)
)
The operation parses the above output and presents in more readable format.
Sources:
[1] www.npmjs.com/package/pdp