dis-bench / src /php /php-src /tests /classes /autoload_012.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
418 Bytes
--TEST--
Ensure callback methods in unknown classes trigger autoload.
--FILE--
<?php
spl_autoload_register(function ($name) {
echo "In autoload: ";
var_dump($name);
});
try {
call_user_func("UndefC::test");
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
In autoload: string(6) "UndefC"
call_user_func(): Argument #1 ($callback) must be a valid callback, class "UndefC" not found