PHP部门返回不同的结果(Linux / Windows)

I make a simple division using php. Then I test the result in a windows machine running apache and in a linux machine running apache as well.

 WINDOWS: 1/15 returns 0.066666666666667
 LINUX: 1/15 returns   0.0666666666667

Any suggestions why this is happening? Is it php, apache or OS?

In general, the size of a PHP float is platform-dependent, so you should not make any assumptions if you want portable code.

However, the difference you see might also be caused by a difference in configuration settings. The printed value of a floating-point value depends on the precision setting.

Related:

php config. floating point precision settings. number of decimal places option.