Calculate Page Load Time in PHP

Posted on November 24, 2016 at 11:41 am

Simple way to calculate page load time in PHP:

$time_start = microtime(true);
 
// Do all your stuff and procedures here
 
$time_end = microtime(true);
$time = number_format( $time_end - $time_start, 2 );
 
echo "<!-- Page loaded in ".out($time)." seconds -->";

Other Posts

Updated Posts