Add a regression test for auto_globals_jit=0 with preloading on

This commit is contained in:
Niels Dossche 2022-12-18 14:16:01 +01:00 committed by Ilija Tovilo
parent c4487b7a12
commit bbad29b9c1
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,6 @@
<?php
class Test {
function count_global_server() {
return count($_SERVER);
}
}

View file

@ -0,0 +1,20 @@
--TEST--
Preloading with auto_globals_jit=0
--INI--
auto_globals_jit=0
opcache.enable=1
opcache.enable_cli=1
opcache.preload={PWD}/preloading_no_auto_globals_jit.inc
--EXTENSIONS--
opcache
--SKIPIF--
<?php
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
?>
--FILE--
<?php
$test = new Test;
var_dump($test->count_global_server());
?>
--EXPECTF--
int(%d)