xref: /php-src/ext/opcache/tests/bug71127.phpt (revision e9f783fc)
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--EXTENSIONS--
8opcache
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--
24Warning: Constant FOO already defined in %sbug71127.inc on line %d
25okey
26