- var_dump: documentation ( source)
- microtime: documentation ( source)
- round: documentation ( source)
- explode: documentation ( source)
<?php
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
var_dump($time);
$time_end = microtime_float();
$time = round( ( $time_end - $time_start ) * 1000, 3 );
echo "time: $time ms\n";