Have a Snippet?

Keep, track and share your code snippets with your friends

PHP: Execution time of the script Share on Vkontakte

Execution time of the script. Shows the text like this: "The script has been executed in 0.0090 sec."

$time_start = microtime(true);

// your PHP code here

$time_end = microtime(true);
$time = $time_end - $time_start;

echo 'This script has been executed in ' . $time . ' sec.'; 


Tag: PHP, Execution Time, DateTime

0 Comments