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