/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/bug39884.phpt
23 строки
632 B
Tim Düsterhus
Replace `@deprecated` by `#[\Deprecated]` for internal functions / class constants (#14750)
10 июл 2024, 17:47
Не верифицирован
10 июл 2024, 17:47
29f98e7
Код
Авторство
О чём код?
--TEST-- Bug #39884 (ReflectionParameter::getClass() throws exception for type hint self) --FILE-- <?php class stubParamTest { function paramTest(self $param) { // nothing to do } } $test1 = new stubParamTest(); $test2 = new stubParamTest(); $test1->paramTest($test2); $refParam = new ReflectionParameter(array('stubParamTest', 'paramTest'), 'param'); var_dump($refParam->getClass()); ?> --EXPECTF-- Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d object(ReflectionClass)#4 (1) { ["name"]=> string(13) "stubParamTest" }