- var_dump: documentation ( source)
<?php
class test
{
public function __toString()
{
$e = new Exception('mooo');
var_dump($e->getBacktrace());
// throw $e;
return null;
}
}
$x = new test;
var_dump((string)$x);