xref: /PHP-7.4/ext/json/tests/bug62010.phpt (revision ded3d984)
1--TEST--
2Bug #62010 (json_decode produces invalid byte-sequences)
3--SKIPIF--
4<?php if (!extension_loaded("json")) print "skip"; ?>
5--FILE--
6<?php
7
8var_dump(json_decode('"\ud834"'));
9var_dump(json_last_error() === JSON_ERROR_UTF16);
10var_dump(json_last_error_msg());
11?>
12--EXPECT--
13NULL
14bool(true)
15string(50) "Single unpaired UTF-16 surrogate in unicode escape"
16