3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function murder() { try { return $debts; } finally { try { return $ransom; } finally { try { return $satan_please_let_me_die; } finally { try { return $god_why; } finally { throw new SweetDeath; } } } } } var_dump(murder());
based on VtVjn
Output for 7.1.0 - 7.2.0
Notice: Undefined variable: debts in /in/kgpST on line 5 Notice: Undefined variable: ransom in /in/kgpST on line 8 Notice: Undefined variable: satan_please_let_me_die in /in/kgpST on line 11 Notice: Undefined variable: god_why in /in/kgpST on line 14 Fatal error: Uncaught Error: Class 'SweetDeath' not found in /in/kgpST:16 Stack trace: #0 /in/kgpST(23): murder() #1 {main} thrown in /in/kgpST on line 16
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught Error: Class 'SweetDeath' not found in /in/kgpST:16 Stack trace: #0 /in/kgpST(23): murder() #1 {main} thrown in /in/kgpST on line 16
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Class 'SweetDeath' not found in /in/kgpST on line 16
Process exited with code 255.
Output for 5.4.10 - 5.4.45
Parse error: syntax error, unexpected 'finally' (T_STRING), expecting catch (T_CATCH) in /in/kgpST on line 6
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_STRING, expecting T_CATCH in /in/kgpST on line 6
Process exited with code 255.