For example, I have this line of code:
echo 10359023529 + 0.2137582935;
为什么会返回以下结果而不是10359023529.2137582935?
For example, I have this line of code:
echo 10359023529 + 0.2137582935;
在 php.ini
中有一种不常用的选项,它定义了打印浮点数时要显示多少个有效数字。在我的情况下,它如下所示:
; The number of significant digits displayed in floating point numbers.
; http://php.net/precision
precision = 14