1--TEST--
2Test json_decode() function : error conditions
3--FILE--
4<?php
5echo "*** Testing json_decode() : error conditions ***\n";
6
7echo "\n-- Testing json_decode() function with depth below 0 --\n";
8
9try {
10    var_dump(json_decode('"abc"', true, -1));
11} catch (\ValueError $e) {
12    echo $e->getMessage() . \PHP_EOL;
13}
14
15?>
16--EXPECT--
17*** Testing json_decode() : error conditions ***
18
19-- Testing json_decode() function with depth below 0 --
20json_decode(): Argument #3 ($depth) must be greater than 0
21