mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Added test
This commit is contained in:
parent
b67e28367c
commit
a2ba970ce3
8
ext/opcache/tests/preload.inc
Normal file
8
ext/opcache/tests/preload.inc
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
function f1() {
|
||||
}
|
||||
|
||||
if (isset($rt)) {
|
||||
function f2() {
|
||||
}
|
||||
}
|
24
ext/opcache/tests/preload_001.phpt
Normal file
24
ext/opcache/tests/preload_001.phpt
Normal file
@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Preloading basic test
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.optimization_level=-1
|
||||
opcache.preload={PWD}/preload.inc
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(function_exists("f1"));
|
||||
var_dump(function_exists("f2"));
|
||||
|
||||
$rt = true;
|
||||
include(__DIR__ . "/preload.inc");
|
||||
var_dump(function_exists("f2"));
|
||||
?>
|
||||
OK
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
OK
|
Loading…
Reference in New Issue
Block a user