zend_multibyte-09.phpt 505 B

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