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