Export PHP variables with the Exporter class
mainThe SebastianBergmann\Exporter\Exporter class provides methods to convert PHP variables into a string format suitable for visualization.
Use the export() method to get a detailed string representation of any variable, including objects, arrays, and simple types.
<?php
use SebastianBergmann\Exporter\Exporter;
$exporter = new Exporter;
// Exporting an Exception object
print $exporter->export(new Exception);