xref: /PHP-8.4/ext/opcache/tests/gh8133.phpt (revision 4397811d)
1--TEST--
2Enum preloading
3--EXTENSIONS--
4opcache
5--INI--
6opcache.enable=1
7opcache.enable_cli=1
8opcache.optimization_level=-1
9opcache.preload={PWD}/gh8133.inc
10--SKIPIF--
11<?php
12if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
13?>
14--FILE--
15<?php
16
17var_dump(Foo::CASES);
18var_dump(Qux::CASES);
19
20?>
21--EXPECT--
22array(2) {
23  [0]=>
24  enum(Foo::Bar)
25  [1]=>
26  enum(Foo::Baz)
27}
28array(2) {
29  [0]=>
30  enum(Foo::Bar)
31  [1]=>
32  enum(Foo::Baz)
33}
34