3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { throw new \Exception('1'); } catch (\Exception $ex1) { echo "c1"; throw new \Exception('2'); } finally { ech('1'); } function ech ($a) { echo $a; }
Output for 7.0.0 - 7.2.0
c11 Fatal error: Uncaught Exception: 2 in /in/8Kuok:8 Stack trace: #0 {main} thrown in /in/8Kuok on line 8
Process exited with code 255.
Output for 5.5.24 - 5.6.28
c11 Fatal error: Uncaught exception 'Exception' with message '2' in /in/8Kuok:8 Stack trace: #0 {main} thrown in /in/8Kuok on line 8
Process exited with code 255.
Output for 5.3.20 - 5.4.45
Parse error: syntax error, unexpected '{' in /in/8Kuok on line 9
Process exited with code 255.