mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
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.
24 lines
395 B
PHP
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)
|