Posted By

ibomb on 04/29/08


Tagged

php time script execution


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
dethnull


Calculating script execution time


 / Published in: PHP
 

URL: blog.doguki.com

  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. ?>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: dubsar on July 2, 2011

very useful bit of code!

You need to login to post a comment.