9

我尝试像这样使用 json_decode:

json_decode($string, true, 100, JSON_BIGINT_AS_STRING);

但我得到了错误:

Warning: json_decode() expects at most 2 parameters, 4 given in /home/content/27/2326027/html/sys/get.php on line 38

任何回应都会受到赞赏

4

1 回答 1

19

好像您的 PHP 版本不支持这些参数。

见手册:

Version     Description
5.4.0   The options parameter was added.
5.3.0   Added the optional depth. The default recursion depth was increased from 128 to 512
5.2.3   The nesting limit was increased from 20 to 128
5.2.1   Added support for JSON decoding of basic types. 

要使用您编写的代码,您至少需要 5.4.0 版本...

于 2012-05-09T02:05:56.367 回答