1--TEST-- 2Bug #69840 (iconv_substr() doesn't work with UTF-16BE) 3--FILE-- 4<?php 5$str = iconv_substr("a\x00b\x00", 0, 1, 'UTF-16LE'); 6var_dump(strlen($str)); 7var_dump(ord($str[0])); 8var_dump(ord($str[1])); 9$str = iconv_substr("\x00a\x00b", 0, 1, 'UTF-16BE'); 10var_dump(strlen($str)); 11var_dump(ord($str[0])); 12var_dump(ord($str[1])); 13?> 14--EXPECT-- 15int(2) 16int(97) 17int(0) 18int(2) 19int(0) 20int(97) 21