xref: /PHP-7.4/ext/reflection/tests/bug78774.phpt (revision c9abfaec)
1--TEST--
2Bug #78774: ReflectionNamedType on Typed Properties Crash
3--FILE--
4<?php
5
6class Test {
7    public stdClass $prop;
8}
9
10$rc = new ReflectionClass(Test::class);
11$rp = $rc->getProperty('prop');
12$rt = $rp->getType();
13
14// Force a resolution of the property type
15$test = new Test;
16$test->prop = new stdClass;
17
18var_dump($rt->getName());
19
20?>
21--EXPECT--
22string(8) "stdClass"
23