1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/opcache/tests/preload_enum.phpt
Nikita Popov b1b0c81e39 Don't print preload warning for non-top-level classes
Dynamically declared classes categorically do not get linked during
preloading, even if all their dependencies are known. The warning
is misleading in this case, and there isn't anything the user can
do to address it.
2021-07-30 10:27:51 +02:00

24 lines
395 B
PHP

--TEST--
Enum preloading
--EXTENSIONS--
opcache
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.preload={PWD}/preload_enum.inc
--SKIPIF--
<?php
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
--FILE--
<?php
var_dump(MyEnum::Foo);
var_dump(MyEnum::Bar);
?>
--EXPECT--
enum(MyEnum::Bar)
enum(MyEnum::Foo)
enum(MyEnum::Bar)