3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function loader1($class) { var_dump(__FUNCTION__, $class); } function loader2($class) { var_dump(__FUNCTION__, $class); } spl_autoload_register('loader1'); spl_autoload_register('loader2'); new Xyz();
Output for 7.0.0 - 7.2.0
string(7) "loader1" string(3) "Xyz" string(7) "loader2" string(3) "Xyz" Fatal error: Uncaught Error: Class 'Xyz' not found in /in/CYhJU:14 Stack trace: #0 {main} thrown in /in/CYhJU on line 14
Process exited with code 255.
Output for 5.3.17 - 5.6.28
string(7) "loader1" string(3) "Xyz" string(7) "loader2" string(3) "Xyz" Fatal error: Class 'Xyz' not found in /in/CYhJU on line 14
Process exited with code 255.