diff options
author | Christoph M. Becker <cmb@php.net> | 2015-06-17 13:40:19 +0200 |
---|---|---|
committer | Christoph M. Becker <cmb@php.net> | 2015-06-17 13:40:19 +0200 |
commit | c9554b90e4bf96f8a3f617b95775e2a94aeb8237 (patch) | |
tree | 5bc496905ae125a3aa0dd00302426ab32fe91a91 /ext/iconv | |
parent | 4a6e1345e2dfd1d1edfd18b783bc9000598a4d92 (diff) | |
download | php-git-c9554b90e4bf96f8a3f617b95775e2a94aeb8237.tar.gz |
added regression test for bug #69840
Diffstat (limited to 'ext/iconv')
-rw-r--r-- | ext/iconv/tests/bug69840.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/iconv/tests/bug69840.phpt b/ext/iconv/tests/bug69840.phpt new file mode 100644 index 0000000000..af79bbcdd6 --- /dev/null +++ b/ext/iconv/tests/bug69840.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #69840 (iconv_substr() doesn't work with UTF-16BE) +--FILE-- +<?php +$str = iconv_substr("a\x00b\x00", 0, 1, 'UTF-16LE'); +var_dump(strlen($str)); +var_dump(ord($str[0])); +var_dump(ord($str[1])); +$str = iconv_substr("\x00a\x00b", 0, 1, 'UTF-16BE'); +var_dump(strlen($str)); +var_dump(ord($str[0])); +var_dump(ord($str[1])); +?> +--EXPECT-- +int(2) +int(97) +int(0) +int(2) +int(0) +int(97) |