php - 发出警告 : json_decode() expects at most 2 parameters, 4

标签 php json

我试过像这样使用 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

如有回应将不胜感激

最佳答案

您的 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 版本...

关于php - 发出警告 : json_decode() expects at most 2 parameters, 4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10508946/

相关文章:

java - 如何自定义 SpringWebFlux WebClient JSON 反序列化?

php - 当存在 LIMIT 5 时,JOIN 与多个查询

php - 使用 Zend_Mail 获取邮件源

Java Restful服务响应过滤

java - E/Volley : com. android.volley.ParseError : org. json.JSONException:值{"results":[{

json - 使用 restkit 映射到复杂对象

php - 如何取消在mysql中重复键更新时未更新的列

php - 从一个表中获取ID并使用php将其存储到另一个表中

php - 使用php将数据推送到websocket服务器

php - HMVC 和文件夹中的 View (Codeigniter)