php-src/tests/classes/autoload_012.phpt
2008-02-02 00:44:45 +00:00

16 lines
367 B
PHP

--TEST--
Ensure callback methods in unknown classes trigger autoload.
--FILE--
<?php
function __autoload($name)
{
echo "In autoload: ";
var_dump($name);
}
call_user_func("UndefC::test");
?>
--EXPECTF--
In autoload: string(6) "UndefC"
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found in %s on line %d