3v4l.org

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