mirror of
https://github.com/php/php-src.git
synced 2024-10-05 08:46:11 +00:00
21 lines
435 B
Plaintext
21 lines
435 B
Plaintext
|
--TEST--
|
||
|
Bug #41067 (json_encode() problem with UTF-16 input)
|
||
|
--SKIPIF--
|
||
|
<?php if (!extension_loaded("json")) print "skip"; ?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$single_barline = "\360\235\204\200";
|
||
|
$array = array($single_barline);
|
||
|
var_dump(bin2hex((binary)$single_barline));
|
||
|
|
||
|
$json = json_encode($array);
|
||
|
$json_decoded = json_decode($json, true);
|
||
|
|
||
|
var_dump(bin2hex((binary)$json_decoded[0]));
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
unicode(8) "f09d8480"
|
||
|
unicode(8) "f09d8480"
|