I could say that my question is related to PHP, but I'm more interested in the correct programming logic in a situation where the execution of a function can continue indefinitely.
What is the correct way to track the time it takes to execute a function, and how to stop this execution and continue working with the rest of the program?
OK, I know that, for example, there is a set_time_limit () function that returns a fatal error, but I donโt want this, I want my code to simply continue after x seconds or, perhaps after exceeding the time, exceed the exception, catch this and do something else?
Writes some kind of solution to the watchdog function and how is this done?
Thank you for any help you can provide, any link, any article that solves this problem in such a way that it should be done.
BR, Newman
php time exception limit
newman555p
source share