3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { throw new \Exception('Oups.'); } function bar() { return 'Yay'; } function test() { try { $foo = bar(); } catch (\Exception $e) { throw new \Exception('Another one'); } finally { if ($foo === null) { throw new \Exception('Third.'); } return $foo; } } var_dump(test());

preferences:
52.05 ms | 402 KiB | 5 Q