- spl_autoload_register: documentation ( source)
- var_dump: documentation ( source)
- spl_autoload_unregister: documentation ( source)
- spl_autoload_functions: documentation ( source)
<?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());
?>