1

Ok, I have this basics PHP logic made for measuring execution time in PHP, you can find it here. Everything was right, than I, instead of usual time execution range and format suddenly started to get incorrect results, like this:

This page was created in 6.0081481933594E-5 seconds

There is absolutely no chance that script is created(parsed) in 6 seconds (script was empty with exception of time measuring code). And, what happened with correct format? What does it mean 'E-5' I get on end every (incorrect) time usage calculations? I just to get normal, usual time like 0.003454893745 and I can't remember that I've changed some PHP ini settings?

Thanks in advance.

DaveRandom
  • 87,921
  • 11
  • 154
  • 174
Miloš Đakonović
  • 3,751
  • 5
  • 35
  • 55

1 Answers1

8

6.0081481933594E-5

means

6.0081481933594 x 10-5

in other words, .000060081481933594 seconds, or 60 microseconds.

Mat
  • 202,337
  • 40
  • 393
  • 406
Amber
  • 507,862
  • 82
  • 626
  • 550
  • Thanks very much. And, is there way to get things as they were? (.000060081481933594 instead 6.0081481933594E-5) – Miloš Đakonović May 01 '12 at 07:29
  • You can use [`printf`](http://us3.php.net/manual/en/function.printf.php) to explicitly set a format string (and thus choose exactly how to print the decimal number). – Amber May 01 '12 at 07:30