summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests/zend_multibyte-09.phpt
blob: 79ee435aa05c1f3296e51489948080f20a02f3b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
zend multibyte (9)
--SKIPIF--
<?php
ini_set("mbstring.script_encoding","SJIS");
if (ini_set("mbstring.script_encoding","SJIS") != "SJIS") {
	die("skip zend-multibyte is not available");
}
?>
--INI--
mbstring.script_encoding=cp1251
mbstring.internal_encoding=UTF-8
--FILE--
<?php
declare(encoding="EUC-JP");
// forcefully interpret an UTF-8 encoded string as EUC-JP and then convert it
// back to UTF-8. There should be only a pair of consecutive bytes that is
// valid EUC-encoded character "鴻".
var_dump(bin2hex("テスト"));
?>
--EXPECT--
string(16) "3f3f3fe9b4bb3f3f"