3v4l.org

run code in 300+ PHP versions simultaneously
<?php function autoLoadClass($name) { foreach(debug_backtrace() as $call) { if(!array_key_exists('type', $call) && $call['function'] == 'class_exists') { return; } } echo 'spl_autoload_register: ', $name, '<br>'; } spl_autoload_register('autoLoadClass'); class_exists('Foo'); class_exists('Bar'); class_exists('Foo\\Bar');

preferences:
24.69 ms | 406 KiB | 5 Q