3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function throw_exception() { echo "Hi!"; throw new Exception("Oh no, I died"); } throw_exception();
Output for 7.0.0 - 7.2.0
Hi! Fatal error: Uncaught Exception: Oh no, I died in /in/quDLI:5 Stack trace: #0 /in/quDLI(8): throw_exception() #1 {main} thrown in /in/quDLI on line 5
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Hi! Fatal error: Uncaught exception 'Exception' with message 'Oh no, I died' in /in/quDLI:5 Stack trace: #0 /in/quDLI(8): throw_exception() #1 {main} thrown in /in/quDLI on line 5
Process exited with code 255.