Added test

This commit is contained in:
Dmitry Stogov 2018-10-19 13:35:40 +03:00
parent b67e28367c
commit a2ba970ce3
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,8 @@
<?php
function f1() {
}
if (isset($rt)) {
function f2() {
}
}

View 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