Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
PHP page load time
SUBMITTED BY:
Guest
DATE:
Oct. 23, 2013, 9:07 a.m.
FORMAT:
PHP
SIZE:
434 Bytes
Raw
Download
Tweet
HITS:
1080
Go to comments
Report
<?php
//Create a variable for start time - it needs to be the very first line of your web page
$time_start
=
microtime
(
true
);
?>
your web page code goes here
<?php
//Create a variable for end time - this needs to be at the end of the web page when everything else is loaded
$time_end
=
microtime
(
true
);
$time
=
$time_end
-
$time_start
;
echo
'Page took '
.
$time
.
' seconds to execute'
;
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus