xref: /PHP-7.3/ext/opcache/tests/bug71127.phpt (revision 1e3ab158)
1--TEST--
2Bug #71127 (Define in auto_prepend_file is overwrite)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=0x7FFFBFFF
7--SKIPIF--
8<?php if (!extension_loaded('Zend OPcache')) die("skip"); ?>
9--FILE--
10<?php
11$file = __DIR__ . "/bug71127.inc";
12
13file_put_contents($file, "<?php define('FOO', 'bad'); echo FOO;?>");
14
15define("FOO", "okey");
16
17include($file);
18?>
19--CLEAN--
20<?php
21@unlink(__DIR__ . "/bug71127.inc");
22?>
23--EXPECTF--
24Notice: Constant FOO already defined in %sbug71127.inc on line %d
25okey
26