Skip to content

Commit bbad29b

Browse files
nielsdosiluuu1994
authored andcommitted
Add a regression test for auto_globals_jit=0 with preloading on
1 parent c4487b7 commit bbad29b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
class Test {
3+
function count_global_server() {
4+
return count($_SERVER);
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Preloading with auto_globals_jit=0
3+
--INI--
4+
auto_globals_jit=0
5+
opcache.enable=1
6+
opcache.enable_cli=1
7+
opcache.preload={PWD}/preloading_no_auto_globals_jit.inc
8+
--EXTENSIONS--
9+
opcache
10+
--SKIPIF--
11+
<?php
12+
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
13+
?>
14+
--FILE--
15+
<?php
16+
$test = new Test;
17+
var_dump($test->count_global_server());
18+
?>
19+
--EXPECTF--
20+
int(%d)

0 commit comments

Comments
 (0)