3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { protected $buffer = false; function bar($b) { $this->buffer = $b; return ''; } function eh($e) { ob_start(array($this, 'bar')); echo '123'; } } function sh() { return; } register_shutdown_function('sh'); set_exception_handler(array(new foo, 'eh')); throw new Exception;

preferences:
33.94 ms | 402 KiB | 5 Q