sayou
sayou

Reputation: 913

How to know php script load time hosted locally

I have a website developed with PHP from scratch, and I want to know the load time of my php script (my page) in localhost.

is there any method or tools to check that ? I try to use Performance on Google Chrome, but it's very hard to understand, and with some search on Google I found the firebug plugins of firefox, but it's deleted.

is there any solution ?

Upvotes: 2

Views: 412

Answers (2)

Kavinda Harshana
Kavinda Harshana

Reputation: 117

 <?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
echo $start;
?>

Try this

Upvotes: 1

Zak
Zak

Reputation: 1165

I you want the mesure the loading time browser-side, as Madhawa commented, you can view it in the network tab of chrome's developer tools :

enter image description here

If you want the exact execution time of your script, it should be done server-side by checking the time before and after the script. Daniels link should point you to the right direction.

Upvotes: 1

Related Questions