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(); } finally { echo 'finally'; }
based on 5n8l0
Output for 7.0.0 - 7.2.0
trycatchfinally Fatal error: Uncaught RuntimeException in /in/5HsQG:8 Stack trace: #0 {main} thrown in /in/5HsQG on line 8
Process exited with code 255.
Output for 5.5.24 - 5.6.28
trycatchfinally Fatal error: Uncaught exception 'RuntimeException' in /in/5HsQG:8 Stack trace: #0 {main} thrown in /in/5HsQG on line 8
Process exited with code 255.
Output for 5.3.21 - 5.4.45
Parse error: syntax error, unexpected '{' in /in/5HsQG on line 10
Process exited with code 255.