xref: /PHP-7.2/ext/reflection/tests/bug29268.phpt (revision 17ccbeec)
1--TEST--
2Reflection Bug #29268 (__autoload() not called with reflectionProperty->getClass())
3--FILE--
4<?php
5spl_autoload_register(function ($classname) {
6	echo "__autoload($classname)\n";
7	eval("class $classname {}");
8});
9
10class B{
11	public function doit(A $a){
12	}
13}
14
15$ref = new reflectionMethod('B','doit');
16$parameters = $ref->getParameters();
17foreach($parameters as $parameter)
18{
19	$class = $parameter->getClass();
20	echo $class->name."\n";
21}
22echo "ok\n";
23?>
24--EXPECT--
25__autoload(A)
26A
27ok
28