xref: /PHP-7.4/ext/json/tests/bug68567.phpt (revision ded3d984)
1--TEST--
2Bug #68567 JSON_PARTIAL_OUTPUT_ON_ERROR can result in JSON with null key
3--SKIPIF--
4<?php if (!extension_loaded("json")) print "skip"; ?>
5--FILE--
6<?php
7
8var_dump(json_encode(array("\x80" => 1), JSON_PARTIAL_OUTPUT_ON_ERROR));
9
10?>
11===DONE===
12--EXPECT--
13string(6) "{"":1}"
14===DONE===
15