mirror of
https://github.com/php/php-src.git
synced 2026-04-21 06:51:18 +02:00
We should only disable early binding during the opcache_compile_file() calls, not inside the preloading script or anything it includes. The right condition to check for is whether we compile the file without execution, as declaring classes is "execution".
19 lines
368 B
PHP
19 lines
368 B
PHP
--TEST--
|
|
Early binding should work fine inside the preload script
|
|
--INI--
|
|
opcache.enable=1
|
|
opcache.enable_cli=1
|
|
opcache.optimization_level=-1
|
|
opcache.preload={PWD}/preload_early_binding.inc
|
|
--SKIPIF--
|
|
<?php
|
|
require_once('skipif.inc');
|
|
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
|
|
?>
|
|
--FILE--
|
|
OK
|
|
--EXPECT--
|
|
object(X)#1 (0) {
|
|
}
|
|
OK
|