xref: /PHP-8.2/ext/json/tests/bug42090.phpt (revision 32a1ebbd)
1--TEST--
2Bug #42090 (json_decode causes segmentation fault)
3--FILE--
4<?php
5var_dump(
6    json_decode('""'),
7    json_decode('"..".'),
8    json_decode('"'),
9    json_decode('""""'),
10    json_encode('"'),
11    json_decode(json_encode('"')),
12    json_decode(json_encode('""'))
13);
14?>
15--EXPECT--
16string(0) ""
17NULL
18NULL
19NULL
20string(4) ""\"""
21string(1) """
22string(2) """"
23