Needs help!
Posted: Sat Jul 06, 2002 11:34 am
Is it possible to get "how much time does the PHP script cost to run"?
Sorry for my english!
Sorry for my english!
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
//your code here
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo "Did nothing in $time seconds";