Time To Load Php Page

[Solved] Time To Load Php Page | Php - Code Explorer | yomemimo.com
Question : page load time in php

Answered by : manoj-kumar

$starttime = microtime(true); // Top of page
// Code
$endtime = microtime(true); // Bottom of page
$time_taken =($endtime - $starttime)*1000;
$time_taken = round($time_taken,5); // 5 is nothing but Precision
print("Page loaded in seconds", $time_taken );

Source : https://stackoverflow.com/questions/25231153/show-load-time-on-page | Last Update : Tue, 19 Jul 22

Question : time to load php page

Answered by : telmo-cardoso

//Put this code at beginning of your page:
<?php $start_time = microtime(true); ?>
//Put this code at the end of your page:
This page was generated in <?php echo(number_format(microtime(true) - $start_time, 2)); ?> seconds.

Source : | Last Update : Fri, 19 Jun 20

Answers related to time to load php page

Code Explorer Popular Question For Php