bug71127.phpt 473 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #71127 (Define in auto_prepend_file is overwrite)
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=0x7FFFBFFF
  7. --EXTENSIONS--
  8. opcache
  9. --FILE--
  10. <?php
  11. $file = __DIR__ . "/bug71127.inc";
  12. file_put_contents($file, "<?php define('FOO', 'bad'); echo FOO;?>");
  13. define("FOO", "okey");
  14. include($file);
  15. ?>
  16. --CLEAN--
  17. <?php
  18. @unlink(__DIR__ . "/bug71127.inc");
  19. ?>
  20. --EXPECTF--
  21. Warning: Constant FOO already defined in %sbug71127.inc on line %d
  22. okey