Core Coding®

PHP Page Load Time

  PHP Page Load Time
Display the time in milliseconds that a certain page takes to be created. Useful for determining database load time.
<?php
// Insert this block of code at the very top of your page:
$time_start = microtime(true);




// Place this part at the very end of your page
$totaltime = microtime(true) - $time_start;

printf("This page took %f seconds to load.", $totaltime);

Go back to resources
Home Mail GitHub