blob: ed009dd981222bdf435d790050ba5d85b91c8db1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--TEST--
Enum value property has automatic type
--FILE--
<?php
enum IntEnum: int {
case Foo = 0;
}
enum StringEnum: string {
case Foo = 'Foo';
}
echo (new ReflectionProperty(IntEnum::class, 'value'))->getType() . "\n";
echo (new ReflectionProperty(StringEnum::class, 'value'))->getType() . "\n";
?>
--EXPECT--
int
string
|