summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/reflectionclass.phpt
blob: 59b99b3e6d43c11a09d165fd689b1cde27286984 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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)
}