summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bug65915.phpt
blob: c616c4fb5f622793f1e60a678b5a0fb55d5ea6be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Bug #65915 (Inconsistent results with require return value)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_cache_only=0
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$tmp = __DIR__ . "/bug65915.inc.php";

file_put_contents($tmp, '<?php return function(){ return "a";};');
$f = require $tmp;
var_dump($f());

var_dump(opcache_invalidate($tmp, true));

file_put_contents($tmp, '<?php return function(){ return "b";};');
$f = require $tmp;
var_dump($f());

@unlink($tmp);
?>
--EXPECT--
string(1) "a"
bool(true)
string(1) "b"