/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/ReflectionEnum_toString.phpt
42 строки
600 B
Daniel Scherzer
ReflectionClass: show enums differently from classes
26 мар 2025, 23:45
26 мар 2025, 23:45
4233394
Код
Авторство
О чём код?
--TEST-- ReflectionEnum::__toString() --FILE-- <?php enum Foo { case Bar; } echo new ReflectionEnum(Foo::class); ?> --EXPECTF-- Enum [ <user> enum Foo implements UnitEnum ] { @@ %sReflectionEnum_toString.php 3-5 - Enum cases [1] { Case Bar } - Constants [0] { } - Static properties [0] { } - Static methods [1] { Method [ <internal, prototype UnitEnum> static public method cases ] { - Parameters [0] { } - Return [ array ] } } - Properties [1] { Property [ public protected(set) readonly string $name ] } - Methods [0] { } }