bug69092.phpt 393 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #69092 (Declare Encoding Compile Check Wrong)
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded("mbstring")) {
  6. die("skip Requires mbstring extension");
  7. }
  8. ?>
  9. --INI--
  10. zend.multibyte=On
  11. --FILE--
  12. <?php
  13. echo "Hi";
  14. function foo() {
  15. declare(encoding="utf-8");
  16. }
  17. echo "Bye"
  18. ?>
  19. --EXPECTF--
  20. Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d