1--TEST--
2json_validate() - Error handling for max depth
3--SKIPIF--
4<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
5--FILE--
6<?php
7
8try {
9  var_dump(json_validate("-", PHP_INT_MAX));
10} catch (ValueError $error) {
11  echo $error->getMessage() . PHP_EOL;
12  var_dump(json_last_error(), json_last_error_msg());
13}
14
15?>
16--EXPECTF--
17json_validate(): Argument #2 ($depth) must be less than %d
18int(0)
19string(8) "No error"
20