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