/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/gh15902/ReflectionClass-class.phpt
38 строк
534 B
Daniel Scherzer
Reflection: show the type of object constants used as default properties
21 фев 2025, 11:32
Не верифицирован
21 фев 2025, 11:32
ca0414e
Код
Авторство
О чём код?
--TEST-- ReflectionClass object default property - used to say "__CLASS__" --INI-- opcache.enable_cli=0 --FILE-- <?php class C { public stdClass $a = FOO; } $reflector = new ReflectionClass(C::class); define('FOO', new stdClass); new C; echo $reflector; ?> --EXPECTF-- Class [ <user> class C ] { @@ %sReflectionClass-class.php %d-%d - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [1] { Property [ public stdClass $a = object(stdClass) ] } - Methods [0] { } }