3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo() { try { throw new Exception("e1"); } finally { throw new Exception("e2"); } } foo();
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: e1 in /in/DCJJW:5 Stack trace: #0 /in/DCJJW(10): foo() #1 {main} Next Exception: e2 in /in/DCJJW:7 Stack trace: #0 /in/DCJJW(10): foo() #1 {main} thrown in /in/DCJJW on line 7
Process exited with code 255.
Output for 5.5.24 - 5.6.21
Fatal error: Uncaught exception 'Exception' with message 'e1' in /in/DCJJW:5 Stack trace: #0 /in/DCJJW(10): foo() #1 {main} Next exception 'Exception' with message 'e2' in /in/DCJJW:7 Stack trace: #0 /in/DCJJW(10): foo() #1 {main} thrown in /in/DCJJW on line 7
Process exited with code 255.
Output for 5.4.2 - 5.4.45
Parse error: syntax error, unexpected 'finally' (T_STRING), expecting catch (T_CATCH) in /in/DCJJW on line 6
Process exited with code 255.
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected T_STRING, expecting T_CATCH in /in/DCJJW on line 6
Process exited with code 255.