我在两台计算机(windows和linux)上重复了这个
echo "<br />1. ". (10 - 9.99);
echo "<br />2. ". (10 - 9.999);
echo "<br />3. ". (10 - 9.9999);
echo "<br />4. ". (10.0 - 9.99);
echo "<br />5. ". (10.0 - 9.999);
echo "<br />6. ". (10.0 - 9.9999);
echo "<br />7. ". (10 - floatval(9.99));
echo "<br />8. ". (10 - doubleval(9.99));
输出如下:
10 - 9.99 = 0.01
PHP 5.6.30-12~ubuntu16.04.1 + deb.sury.org + 1