Forum Moderators: bakedjake

Message Too Old, No Replies

Can I determine how long a php script takes to execute?

...but not from within the script...

         

bedlam

5:44 pm on Jul 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a simple problem I think--I'd just like to be able to see how long a given php script takes to execute from shell without having to hack the php script itself.

Is there a way to do this?

-b

ChadSEO

7:16 pm on Jul 10, 2006 (gmt 0)

10+ Year Member



bedlam,

If you do the following, it will tell you how it takes to run:

time php myscript.php

Chad

jatar_k

7:20 pm on Jul 10, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you could also do it within the script using microtime [php.net]

bedlam

7:31 pm on Jul 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, I know about microtime, but I was hoping to be able to do it from outside the script itself. But thanks both, time [google.ca] was just the thing.

-b