Max execution time on a function

Hi,

Does anyone know of a way to place a maximum amount of time on a function?

Let's say I have a function called Foo() and a lot is happening in that function. I want to be able to say to PHP run this function, but if it takes more then let's say 5 seconds I want it to trigger an Exception or something...

Or if that would be possible just use some sort of TimeOut like javascript has so that I could trigger that after 5 seconds

I don't think there is such functionality in PHP but if anyone knows how to do somethink like this I'd be glad if you told me...

-MAC-
;-)
-mac-
mailto:mac_doggie@hotmail.com
the Netherlands...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories