Skip to content

Instantly share code, notes, and snippets.

@adamculpepper
Created November 10, 2014 14:52
Show Gist options
  • Save adamculpepper/84a9c7dba885132c1a9f to your computer and use it in GitHub Desktop.
Save adamculpepper/84a9c7dba885132c1a9f to your computer and use it in GitHub Desktop.
Calculate the page/script processing time
<?
$start = (float) array_sum(explode(' ',microtime()));
?>
<!-- CONTENT HERE -->
<?
$end = (float) array_sum(explode(' ',microtime()));
echo "Processing time: ". sprintf("%.4f", ($end-$start))." seconds";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment