mirror of
https://github.com/php/php-src.git
synced 2026-04-23 16:08:35 +02:00
e9f783fcdd
For rationale, see #6787 Extensions migrated in part 3: * ftp * gmp * iconv * opcache * shmop
23 lines
408 B
PHP
23 lines
408 B
PHP
--TEST--
|
|
Bug #69840 (iconv_substr() doesn't work with UTF-16BE)
|
|
--EXTENSIONS--
|
|
iconv
|
|
--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)
|