PHP- Time to load


SUBMITTED BY: scripts4you

DATE: Oct. 21, 2015, 8:47 a.m.

FORMAT: Text only

SIZE: 240 Bytes

HITS: 1727

  1. $start = time();
  2. // put a long operation in here
  3. sleep(2);
  4. $diff = time() - $start;
  5. print "This page needed $diff seconds to load :-)";
  6. // if you want a more exact value, you could use the
  7. // microtime function

comments powered by Disqus