- var_dump: documentation ( source)
- set_exception_handler: documentation ( source)
- sprintf: documentation ( source)
<?php
set_exception_handler(function (Throwable $exception) {
var_dump($exception->getTrace());
});
class Foo
{
private $foo;
public function __toString()
{
return $this->foo;
}
}
sprintf('%s', new Foo());