PHP profiling with microtime(): Negative time?
- by Boldewyn
For a very simple profiling I use microtime() like this:
$now = microtime();
for (...) {
// do something
echo microtime() - $now;
$now = microtime();
}
Now, the output of the echo line seems completely random, that is, I expected fluctuations, but I don't expected negative numbers showing up.
However, a typical result contains ~ 1/3…