A small improvement on getTimer. Using vsprintf instead of sprintf there is no need to assign the array:
<?php
function utime()
{
return (float) (vsprintf('%d.%06d', gettimeofday()));
}
?>
In a test on my machine getTimer took 0.037519 seconds to run through 1000 iterations versus 0.027912 seconds for utime. In total, utime runs about 25% quicker. The use is negligible in an actual benchmarking scenario, but this could provide a slightly more accurate estimate. Of course the time it takes to run the function could always be stored at the start and subtracted from your total value each time it is run.