mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Add tests for json_decode
with depth below 0
This commit is contained in:
parent
2687be6589
commit
2d1ec6f4b5
@ -13,6 +13,9 @@ echo "\n-- Testing json_decode() function with more than expected no. of argumen
|
||||
$extra_arg = 10;
|
||||
var_dump(json_decode('"abc"', true, 512, 0, $extra_arg));
|
||||
|
||||
echo "\n-- Testing json_decode() function with depth below 0 --\n";
|
||||
var_dump(json_decode('"abc"', true, -1));
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
@ -27,4 +30,9 @@ NULL
|
||||
|
||||
Warning: json_decode() expects at most 4 parameters, 5 given in %s on line %d
|
||||
NULL
|
||||
|
||||
-- Testing json_decode() function with depth below 0 --
|
||||
|
||||
Warning: json_decode(): Depth must be greater than zero in %s on line %d
|
||||
NULL
|
||||
===Done===
|
||||
|
Loading…
Reference in New Issue
Block a user