3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function a() { try { throw new Exception('waa'); return 'a'; } finally { echo 'b'; } } echo a();
based on qs46C
Output for 7.0.0 - 7.2.0
b Fatal error: Uncaught Exception: waa in /in/rYKvS:7 Stack trace: #0 /in/rYKvS(18): a() #1 {main} thrown in /in/rYKvS on line 7
Process exited with code 255.
Output for 5.5.24 - 5.6.28
b Fatal error: Uncaught exception 'Exception' with message 'waa' in /in/rYKvS:7 Stack trace: #0 /in/rYKvS(18): a() #1 {main} thrown in /in/rYKvS on line 7
Process exited with code 255.
Output for 5.4.12 - 5.4.45
Parse error: syntax error, unexpected 'finally' (T_STRING), expecting catch (T_CATCH) in /in/rYKvS on line 10
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected T_STRING, expecting T_CATCH in /in/rYKvS on line 10
Process exited with code 255.