> I have a php script that returns about 1.5Mb of data in text format to the
> user. I am wondering if there is a way for php to display the time it took
> to execute the script at the end of the file.
Put this at the top of the script:
<code>
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
</code>
..and this at the end:
<code>
$time_end = getmicrotime();
$time = $time_end - $time_start;
$foo = round ($time, 2);
echo "Execution took $foo seconds.";
</code>
Hope this helps.
Best regards,
Jome
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]