3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Handler { public function handle($exception) { var_dump($exception->getTrace()[0]); } } class Foo { public function bar($baz) { throw new Exception($baz); } } try { (new Foo)->bar('this is the argument'); } catch (Exception $exception) { $handler = new Handler(); $handler->handle($exception); }

preferences:
59.94 ms | 402 KiB | 5 Q