|
Lggr
|
Public Member Functions | |
| export ($value, $indentation=0) | |
| shortenedRecursiveExport (&$data, Context $context=null) | |
| shortenedExport ($value) | |
| toArray ($value) | |
Protected Member Functions | |
| recursiveExport (&$value, $indentation, $processed=null) | |
A nifty utility for visualizing PHP variables.
<?php use SebastianBergmann\Exporter\Exporter;
$exporter = new Exporter; print $exporter->export(new Exception);
| SebastianBergmann\Exporter\Exporter::export | ( | $value, | |
$indentation = 0 |
|||
| ) |
Exports a value as a string
The output of this method is similar to the output of print_r(), but improved in various aspects:
| int | $indentation | The indentation level of the 2nd+ line |
|
protected |
Recursive implementation of export
| mixed | $value | The value to export |
| int | $indentation | The indentation level of the 2nd+ line |
| \SebastianBergmann\RecursionContext\Context | $processed | Previously processed objects |
| SebastianBergmann\Exporter\Exporter::shortenedExport | ( | $value | ) |
Exports a value into a single-line string
The output of this method is similar to the output of SebastianBergmann\Exporter\Exporter::export().
Newlines are replaced by the visible string '
'. Contents of arrays and objects (if any) are replaced by '...'.
| SebastianBergmann\Exporter\Exporter::shortenedRecursiveExport | ( | & | $data, |
| Context | $context = null |
||
| ) |
| array<mixed> | $data | |
| Context | $context |
| SebastianBergmann\Exporter\Exporter::toArray | ( | $value | ) |
Converts an object to an array containing all of its private, protected and public properties.
1.8.17