Skip to content

Instantly share code, notes, and snippets.

@mazhar266
Created April 12, 2012 10:23
Show Gist options
  • Save mazhar266/f5078e7623a1bf35c1ee to your computer and use it in GitHub Desktop.
Save mazhar266/f5078e7623a1bf35c1ee to your computer and use it in GitHub Desktop.
time to execute
<?php
//Create a variable for start time
$time_start = microtime(true);
// Place your PHP/HTML/JavaScript/CSS/Etc. Here
//Create a variable for end time
$time_end = microtime(true);
//Subtract the two times to get seconds
$time = $time_end - $time_start;
echo 'Script took '.$time.' seconds to execute';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment