/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/bug78774.phpt
28 строк
543 B
Nikita Popov
Fix reflection leak if type inside type list is resolved
16 янв 2020, 17:30
16 янв 2020, 17:30
1fa6f03
Код
Авторство
О чём код?
--TEST-- Bug #78774: ReflectionNamedType on Typed Properties Crash --FILE-- <?php class Test { public stdClass $prop; public stdClass|Foo $prop2; } $rc = new ReflectionClass(Test::class); $rp = $rc->getProperty('prop'); $rt = $rp->getType(); $rp2 = $rc->getProperty('prop2'); $rt2 = $rp2->getType(); // Force a resolution of the property type $test = new Test; $test->prop = new stdClass; $test->prop2 = new stdClass; var_dump($rt->getName()); var_dump((string) $rt2); ?> --EXPECT-- string(8) "stdClass" string(12) "stdClass|Foo"