Skip to content

Commit 17540e2

Browse files
committed
Add a regression test for auto_globals_jit=0 with preloading on
1 parent e40a6fc commit 17540e2

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 6 additions & 0 deletions
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+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
--EXPECTF--
19+
int(%d)

0 commit comments

Comments
 (0)