Warning: Massive error in json_encode()

前端 未结 3 1633
栀梦
栀梦 2021-01-19 05:29
  

Recieved in browser: [ \"1968401665333658496\"

3条回答
  •  逝去的感伤
    2021-01-19 06:18

    Javascript has no concept of integers, according to the standard all numbers are IEEE doubles, which means they have 52 bits of mantissa. this leads to a practical maximum "integer" value of 2^53 before any loss of precision.

    I am not sure how you didn't have problems with numbers this large in JS alone - if you didn't your JS implementation is not standards compliant.

提交回复
热议问题