summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bug71127.phpt
blob: 78c5535062cf31386653e5e42968972ea9bb47d4 (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
--TEST--
Bug #71127 (Define in auto_prepend_file is overwrite)
--INI--
opcache.enable=1
opcache.enable_cli=1
--SKIPIF--
<?php if (!extension_loaded('Zend OPcache')) die("skip"); ?>
--FILE--
<?php
$file = __DIR__ . "/bug71127.inc";

file_put_contents($file, "<?php define('FOO', 'bad'); echo FOO;?>");

define("FOO", "okey");

include($file);
?>
--CLEAN--
<?php
@unlink(__DIR__ . "/bug71127.inc");
?>
--EXPECTF--
Notice: Constant FOO already defined in %sbug71127.inc on line %d
okey