Core Coding

PHP Page Load Time

  PHP Page Load Time
Display the time in miliseconds that a certain page takes to be created. Useful for determining database load time.
// Insert this block of code at the very top of your page:
$start explode(" "microtime());
$start $start[1] + $start[0];



// Place this part at the very end of your page
$end explode(" "microtime());
$end $end[1] + $end[0];
$totaltime = ($end $start);

printf("This page took %f seconds to load."$totaltime);
Go back to resources
Home Mail Login