3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php eval('function test() { //some code here throw new Exception(); }'); test();
based on dLBi9
Output for 7.0.20, 7.1.5 - 7.2.0
Fatal error: Uncaught Exception in /in/58p6J(3) : eval()'d code:4 Stack trace: #0 /in/58p6J(9): test() #1 {main} thrown in /in/58p6J(3) : eval()'d code on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.6, 7.1.0
Fatal error: Uncaught Exception in /in/58p6J(7) : eval()'d code:4 Stack trace: #0 /in/58p6J(9): test() #1 {main} thrown in /in/58p6J(7) : eval()'d code on line 4
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Uncaught exception 'Exception' in /in/58p6J(7) : eval()'d code:4 Stack trace: #0 /in/58p6J(9): test() #1 {main} thrown in /in/58p6J(7) : eval()'d code on line 4
Process exited with code 255.