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); }
based on oRkmN
Output for 7.0.0 - 7.2.0
trycatch Fatal error: Uncaught InvalidArgumentException in /in/5n8l0:5 Stack trace: #0 {main} Next RuntimeException in /in/5n8l0:8 Stack trace: #0 {main} thrown in /in/5n8l0 on line 8
Process exited with code 255.
Output for 5.3.21 - 5.6.28
trycatch Fatal error: Uncaught exception 'InvalidArgumentException' in /in/5n8l0:5 Stack trace: #0 {main} Next exception 'RuntimeException' in /in/5n8l0:8 Stack trace: #0 {main} thrown in /in/5n8l0 on line 8
Process exited with code 255.