Calculating script execution time


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. $start = (float) array_sum(explode(' ',microtime()));
  3.  
  4. // put you code that wanted to render at here
  5.  
  6. $end = (float) array_sum(explode(' ',microtime()));
  7.  
  8. echo "Processing time: ". sprintf("%.4f", ($end-$start))." seconds";
  9. ?>

URL: blog.doguki.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.