计算脚本执行时间

Avatar of Chris Coyier
Chris Coyier
$execution_time = microtime(); // Start counting

// Your code

$execution_time = microtime() - $execution_time;
printf('It took %.5f sec', $execution_time);