xref: /PHP-8.4/ext/reflection/tests/bug29268.phpt (revision 29f98e74)
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--EXPECTF--
25Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
26__autoload(A)
27A
28ok
29