bug65184.phpt 590 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Test bug #65184 strftime() returns insufficient-length string under multibyte locales
  3. --SKIPIF--
  4. <?php
  5. if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
  6. die("skip Test is valid for Windows");
  7. }
  8. ?>
  9. --INI--
  10. date.timezone = UTC
  11. error_reporting=E_ALL&~E_DEPRECATED
  12. --FILE--
  13. <?php
  14. setlocale(LC_ALL, 'Japanese_Japan.932');
  15. /* timestamp has to be some wednesday */
  16. $s = strftime('%A', 1372884126);
  17. for ($i = 0; $i < strlen($s); $i++) {
  18. printf("%x ", ord($s[$i]));
  19. }
  20. echo "\n";
  21. echo strlen(strftime('%A')), "\n";
  22. ?>
  23. --EXPECT--
  24. 90 85 97 6a 93 fa
  25. 6