警告:json_decode()最多期望2个参数,给定4个 [英] Warning: json_decode() expects at most 2 parameters, 4 given

查看:86
本文介绍了警告:json_decode()最多期望2个参数,给定4个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图像这样使用json_decode:

I tried to use json_decode like this:

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版本不支持这些参数.

Seems like your PHP version doesn't support those parameters.

请参阅手册:

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

To use the code you written, you should need atleast 5.4.0 version...

这篇关于警告:json_decode()最多期望2个参数,给定4个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆