xref: /PHP-8.2/Zend/tests/enum/gh8176.phpt (revision cbbf3502)
1--TEST--
2Enum object in property initializer
3--FILE--
4<?php
5
6class AClass
7{
8    public $prop = AnEnum::Value;
9}
10
11enum AnEnum
12{
13    case Value;
14}
15
16var_dump(new AClass);
17
18?>
19--EXPECT--
20object(AClass)#2 (1) {
21  ["prop"]=>
22  enum(AnEnum::Value)
23}
24