xref: /PHP-7.0/ext/json/tests/bug62010.phpt (revision 64c37114)
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--EXPECTF--
13NULL
14bool(true)
15string(50) "Single unpaired UTF-16 surrogate in unicode escape"
16