I see every one suggests using a variable such as
$start_time = microtime(TRUE);
on top of the script, and then on the final line we do:
$process_time = microtime(TRUE) - $start_time;
My question is, can we reliably use $_SERVER['REQUEST_TIME_FLOAT']
and skip the $start_time altogether? if so, why does every one still suggest using $start_time on top?
Example of what I mean:
<?php
// No need for $start_time...
// All the stuff we do to have the benchmark at the end
// Only this line needed to display execution time
echo "Processed in: ". bcsub(microtime(TRUE), "{$_SERVER['REQUEST_TIME_FLOAT']}", 4);
?>