summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bug71127.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/opcache/tests/bug71127.phpt')
-rw-r--r--ext/opcache/tests/bug71127.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/opcache/tests/bug71127.phpt b/ext/opcache/tests/bug71127.phpt
new file mode 100644
index 0000000000..78c5535062
--- /dev/null
+++ b/ext/opcache/tests/bug71127.phpt
@@ -0,0 +1,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