xref: /PHP-8.2/Zend/tests/enum/gh8418.phpt (revision ddc0b490)
1--TEST--
2GH-8418: Enum constant expression evaluation doesn't work with warmed cache
3--FILE--
4<?php
5
6class ExampleClass
7{
8    public const EXAMPLE_CONST = 42;
9}
10
11enum ExampleEnum: int
12{
13    case ENUM_CASE = ExampleClass::EXAMPLE_CONST;
14}
15
16var_dump(ExampleEnum::ENUM_CASE->value);
17
18?>
19--EXPECT--
20int(42)
21