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');
Output for 7.0.0 - 7.1.0
######### handler2() called ######### Fatal error: Uncaught Error: Class 'bar' not found in /in/Zl1P0:9 Stack trace: #0 [internal function]: handler2() #1 {main} thrown in /in/Zl1P0 on line 9
Process exited with code 255.
Output for hhvm-3.12.0
######### handler2() called ######### Fatal error: Class undefined: bar in /in/Zl1P0 on line 9
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 137.
Output for 5.0.0 - 5.3.29, 5.4.7 - 5.6.28
######### handler2() called ######### Fatal error: Class 'bar' not found in /in/Zl1P0 on line 9
Process exited with code 255.
Output for 5.4.0 - 5.4.6
######### handler2() called ######### Fatal error: Class 'bar' not found in /in/Zl1P0 on line 9
Output for 4.3.3 - 4.4.9
######### handler2() called ######### Fatal error: Cannot instantiate non-existent class: bar in /in/Zl1P0 on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.2
######### handler2() called ######### Fatal error: Cannot instantiate non-existent class: bar in /in/Zl1P0 on line 9