zend_multibyte-09.phpt 440 B

123456789101112131415161718
  1. --TEST--
  2. zend multibyte (9)
  3. --EXTENSIONS--
  4. mbstring
  5. --INI--
  6. zend.multibyte=On
  7. zend.script_encoding=cp1251
  8. internal_encoding=UTF-8
  9. --FILE--
  10. <?php
  11. declare(encoding="EUC-JP");
  12. // forcefully interpret an UTF-8 encoded string as EUC-JP and then convert it
  13. // back to UTF-8. There should be only a pair of consecutive bytes that is
  14. // valid EUC-encoded character "鴻".
  15. var_dump(bin2hex("テスト"));
  16. ?>
  17. --EXPECT--
  18. string(16) "3f3f3fe9b4bb3f3f"