3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo() { throw new \Exception('Oups.'); } try { $foo = foo(); } catch (\Exception $e) { throw new \Exception('Another one'); } finally { if ($foo === null) { throw new \Exception('Third.'); } return $foo; }
Output for 7.2.11
Notice: Undefined variable: foo in /in/ejrAX on line 12 Fatal error: Uncaught Exception: Another one in /in/ejrAX:10 Stack trace: #0 {main} Next Exception: Third. in /in/ejrAX:13 Stack trace: #0 {main} thrown in /in/ejrAX on line 13
Process exited with code 255.