Why does PHP say that the microsecond is 1/10000 seconds?

As far as I know, the microsecond is 1/1000000 seconds (millionth). However, for some reason, my php.exe v5.4.12 x64 (CLI on windows 7 x64) seems to “think”, it really is 1 / 10000th (one thenthousand'th).

If I run the following php script:

<?php
while(true)
{
    echo microtime(true)."\r";
}
?>

The counter that I see on the screen is never considered the past .9999. He jumps from 1381994204.9999 to 1381994205.0

I was going to go crazy this last night by writing a script that computes something for a second, after that I changed the formula to split microtime (true) output by 10,000 instead of 1,000,000, and it worked fine ..

+4
source share
1 answer

true, - . 1381994986.3488 14 , float:

" , ~ 1.8e308 14 (64- IEEE).

, , , , , .

+6

All Articles