So I measure execution time like this:
$time = -microtime(true);
...
$time += microtime(true);
PHP version is 5.3.26RC1 x86 running on Win Server 2008 x64 machine. "Precision" ini parameter equals 16. However, each time the execution time is below 0.001, it just returns zero (obviously, the script can't be executed instantly!). What's even more strange, my test machine (standard php.ini-development) returns nonzero values even if there is no code between these two statements... What could be wrong?
Upd: Simple test:
<?php
ini_set('precision',16);
echo php_uname() . PHP_EOL;
echo phpversion() . PHP_EOL;
echo ini_get('precision').PHP_EOL;
$time = -microtime(true);
$time += microtime(true);
echo number_format($time, 10) .PHP_EOL;
?>
Test machine output:
Windows NT XXX 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586
5.4.12
16
0.0000028610
Production machine output:
Windows NT XXX 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
5.3.26RC1
16
0.0000000000