3v4l.org

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

preferences:
39.51 ms | 402 KiB | 5 Q