php json_decode int类型溢出 变float类型

php在  json_decode  时候可能出现json 数据中 int 类型 过长,转为数组变成float 类型

 $post = json_decode($content,true);
 
  float 2.0423412312312E+16

 可改成:

$post = json_decode($content,true,512,JSON_BIGINT_AS_STRING);

  

posted @ 2019-08-09 15:05  Reset_90  阅读(575)  评论(0编辑  收藏  举报