gh9008.phpt 365 B

123456789101112131415161718192021222324
  1. --TEST--
  2. GH-9008 (mb_detect_encoding(): wrong results with null $encodings)
  3. --EXTENSIONS--
  4. mbstring
  5. --FILE--
  6. <?php
  7. $string = "<?php
  8. function test()
  9. {
  10. }
  11. ";
  12. mb_detect_order(["ASCII", "UUENCODE"]);
  13. var_dump(
  14. mb_detect_encoding($string, null, true),
  15. mb_detect_encoding($string, mb_detect_order(), true),
  16. );
  17. ?>
  18. --EXPECT--
  19. string(5) "ASCII"
  20. string(5) "ASCII"