dis-bench / src /php /php-src /ext /json /tests /bug62010.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
294 Bytes
--TEST--
Bug #62010 (json_decode produces invalid byte-sequences)
--FILE--
<?php
var_dump(json_decode('"\ud834"'));
var_dump(json_last_error() === JSON_ERROR_UTF16);
var_dump(json_last_error_msg());
?>
--EXPECT--
NULL
bool(true)
string(50) "Single unpaired UTF-16 surrogate in unicode escape"