3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function f1($class) { echo "f1: [[$class]]\n"; } function f2($class) { echo "f2: [[$class]]\n"; } spl_autoload_register('f1'); spl_autoload_register('f2'); //spl_autoload_register(create_function('$class', 'echo "cf1: [[$class]]\n";')); //spl_autoload_register(create_function('$class', 'echo "cf2: [[$class]]\n";')); var_dump(spl_autoload_functions()); foreach (spl_autoload_functions() AS $func) { spl_autoload_unregister($func); } var_dump(spl_autoload_functions()); ?>
based on EPVUX
Output for 5.1.0 - 7.1.0
array(2) { [0]=> string(2) "f1" [1]=> string(2) "f2" } array(0) { }
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function spl_autoload_register() in /in/gA1kF on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: spl_autoload_register() in /in/gA1kF on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: spl_autoload_register() in /in/gA1kF on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: spl_autoload_register() in /in/gA1kF on line 6