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"; new bar(); } register_shutdown_function('handler2'); register_shutdown_function('handler1'); new foo();
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'foo' not found in /in/WIfdD:14 Stack trace: #0 {main} thrown in /in/WIfdD on line 14 ######### handler2() called ######### Fatal error: Uncaught Error: Class 'bar' not found in /in/WIfdD:9 Stack trace: #0 [internal function]: handler2() #1 {main} thrown in /in/WIfdD on line 9
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Class 'foo' not found in /in/WIfdD on line 14 ######### handler2() called ######### Fatal error: Class 'bar' not found in /in/WIfdD on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: foo in /in/WIfdD on line 14 ######### handler2() called ######### Fatal error: Cannot instantiate non-existent class: bar in /in/WIfdD 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/WIfdD on line 14 ######### handler2() called ######### Fatal error: Cannot instantiate non-existent class: bar in /in/WIfdD on line 9