php-src/ext/reflection/tests/bug29268.phpt
2012-10-10 10:27:49 +08:00

28 lines
476 B
PHP

--TEST--
Reflection Bug #29268 (__autoload() not called with reflectionProperty->getClass())
--FILE--
<?php
function __autoload($classname) {
echo "__autoload($classname)\n";
eval("class $classname {}");
}
class B{
public function doit(A $a){
}
}
$ref = new reflectionMethod('B','doit');
$parameters = $ref->getParameters();
foreach($parameters as $parameter)
{
$class = $parameter->getClass();
echo $class->name."\n";
}
echo "ok\n";
?>
--EXPECT--
__autoload(A)
A
ok