PHP Integer Problem

后端 未结 5 1972
一生所求
一生所求 2021-01-14 19:42

When I print this number in php 137582392964679 I get this as the output 1.37582392965E+14

All I am doing is a simple



        
5条回答
  •  礼貌的吻别
    2021-01-14 20:08

    The manual clearly says:

    If PHP encounters a number beyond the bounds of the integer type, it will be interpreted as a float instead.

    Also your number cannot be represented accurately because of inherent floating point limitations, hence it is being approximated.

提交回复
热议问题