$vendor = __DIR__;
while (!
file_exists($vendor.'/vendor'
)) { $vendor =
dirname($vendor);
}require $vendor.'/vendor/autoload.php';
use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\VarDumper;
VarDumper::
setHandler(function D
$var, string
$label = null
) { $dumper =
new DumpDataCollector();
$cloner =
new VarCloner();
$handler =
function D
$var, string
$label = null
) use ($dumper,
$cloner) { $var =
$cloner->
cloneVar($var);
if (null !==
$label) { $var =
$var->
withContext(['label' =>
$label]);
} $dumper->
dump($var);
};
VarDumper::
setHandler($handler);
$handler($var,
$label);
});