How To Check Page Loading Time In Php

[Solved] How To Check Page Loading Time In Php | Php - Code Explorer | yomemimo.com
Question : how to check page loading time in php

Answered by : manoj-kumar

$startTime = array_sum(explode(" ",microtime()));
error_log("Started time=======".$startTime);
echo "=======Your Code=======";
echo "=======Your Code=======";
echo "=======Your Code=======";
echo "=======Your Code=======";
echo "=======Your Code=======";
$endTime = array_sum(explode(" ",microtime()));
error_log("Started time=======".$endTime);
$timeTaken = round(($endTime - $startTime),2);
error_log("Page loaded in $timeTaken seconds");

Source : | Last Update : Wed, 29 Jun 22

Answers related to how to check page loading time in php

Code Explorer Popular Question For Php