/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/ReflectionConstant_getAttributes.phpt
19 строк
325 B
DanielEScherzer
[RFC] Add support for attributes on compile-time constants
29 апр 2025, 21:53
Не верифицирован
29 апр 2025, 21:53
3f03f7e
Код
Авторство
О чём код?
--TEST-- ReflectionConstant::getAttributes() with attribute --FILE-- <?php #[Foo] const CT_CONST = 42; $reflectionConstant = new ReflectionConstant('CT_CONST'); var_dump($reflectionConstant->getAttributes()); ?> --EXPECTF-- array(1) { [0]=> object(ReflectionAttribute)#%d (1) { ["name"]=> string(3) "Foo" } }