xref: /PHP-5.5/ext/opcache/tests/bug65915.phpt (revision 27dc82d0)
1--TEST--
2Bug #65915 (Inconsistent results with require return value)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6--SKIPIF--
7<?php require_once('skipif.inc'); ?>
8--FILE--
9<?php
10$tmp = __DIR__ . "/bug65915.inc.php";
11
12file_put_contents($tmp, '<?php return function(){ return "a";};');
13$f = require $tmp;
14var_dump($f());
15
16opcache_invalidate($tmp, true);
17
18file_put_contents($tmp, '<?php return function(){ return "b";};');
19$f = require $tmp;
20var_dump($f());
21
22@unlink($tmp);
23?>
24--EXPECT--
25string(1) "a"
26string(1) "b"
27