3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { echo 'try'; throw new \InvalidArgumentException(); } catch (\InvalidArgumentException $e) { echo 'catch'; throw new \RuntimeException(null, null, $e); } finally { echo 'finally'; }
based on UmeYK
Output for 7.0.0 - 7.2.0
trycatchfinally Fatal error: Uncaught InvalidArgumentException in /in/oRkmN:5 Stack trace: #0 {main} Next RuntimeException in /in/oRkmN:8 Stack trace: #0 {main} thrown in /in/oRkmN on line 8
Process exited with code 255.
Output for 5.5.24 - 5.6.28
trycatchfinally Fatal error: Uncaught exception 'InvalidArgumentException' in /in/oRkmN:5 Stack trace: #0 {main} Next exception 'RuntimeException' in /in/oRkmN:8 Stack trace: #0 {main} thrown in /in/oRkmN on line 8
Process exited with code 255.
Output for 5.3.21 - 5.4.45
Parse error: syntax error, unexpected '{' in /in/oRkmN on line 10
Process exited with code 255.