1
0
mirror of https://github.com/php/php-src.git synced 2026-04-07 16:13:32 +02:00
Files
archived-php-src/ext/json/tests/json_decode_error.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

20 lines
507 B
PHP

--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));
?>
--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