3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function handler() { echo "In handler"; print_r(error_get_last()); new bar(); } register_shutdown_function('handler'); new foo();
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'foo' not found in /in/3mSDX:9 Stack trace: #0 {main} thrown in /in/3mSDX on line 9 In handlerArray ( [type] => 1 [message] => Uncaught Error: Class 'foo' not found in /in/3mSDX:9 Stack trace: #0 {main} thrown [file] => /in/3mSDX [line] => 9 ) Fatal error: Uncaught Error: Class 'bar' not found in /in/3mSDX:6 Stack trace: #0 [internal function]: handler() #1 {main} thrown in /in/3mSDX on line 6
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Class undefined: foo in /in/3mSDX on line 9 In handlerArray ( [type] => 16777217 [message] => Class undefined: foo [file] => /in/3mSDX [line] => 9 ) Fatal error: Class undefined: bar in /in/3mSDX on line 6
Process exited with code 255.
Output for 5.2.0 - 5.6.28
Fatal error: Class 'foo' not found in /in/3mSDX on line 9 In handlerArray ( [type] => 1 [message] => Class 'foo' not found [file] => /in/3mSDX [line] => 9 ) Fatal error: Class 'bar' not found in /in/3mSDX on line 6
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'foo' not found in /in/3mSDX on line 9 In handler Fatal error: Call to undefined function error_get_last() in /in/3mSDX on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Cannot instantiate non-existent class: foo in /in/3mSDX on line 9 In handler Fatal error: Call to undefined function: error_get_last() in /in/3mSDX on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Cannot instantiate non-existent class: foo in /in/3mSDX on line 9 In handler Fatal error: Call to undefined function: error_get_last() in /in/3mSDX on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: foo in /in/3mSDX on line 9 In handler Fatal error: Call to undefined function: error_get_last() in /in/3mSDX on line 5