1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/Zend/tests/enum/reflectionclass.phpt
Ilija Tovilo 269c8dac1d Implement enums
RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.
2021-03-17 19:08:03 +01:00

21 lines
246 B
PHP

--TEST--
Enum reflection getConstants()
--FILE--
<?php
enum Foo {
case Bar;
case Baz;
}
var_dump((new \ReflectionClass(Foo::class))->getConstants());
?>
--EXPECT--
array(2) {
["Bar"]=>
enum(Foo::Bar)
["Baz"]=>
enum(Foo::Baz)
}