blob: 4089a7897f578a3baccacd5034be8e5584d51495 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Test json_decode() function : error conditions
--SKIPIF--
<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
echo "*** Testing json_decode() : error conditions ***\n";
echo "\n-- Testing json_decode() function with depth below 0 --\n";
var_dump(json_decode('"abc"', true, -1));
?>
===Done===
--EXPECTF--
*** Testing json_decode() : error conditions ***
-- Testing json_decode() function with depth below 0 --
Warning: json_decode(): Depth must be greater than zero in %s on line %d
NULL
===Done===
|