最初の方法
$start = microtime(true);
// code
$end = microtime(true);
echo 'This page loaded in '.round($end - $start, 4).' sec';
2番目の方法
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
// code
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo 'This page loaded in '.$total_time.' sec';
それらとどちらが優れているかの違いは何ですか? また、他の提案はありますか?