christmas day php sleep question - how festive

Associate
Joined
24 Jul 2004
Posts
1,580
Location
Preston, Lancs
If I set a script that runs through the web (not command line) - and it has say 20 lines that pause every 10 seconds, with php's default script timeout of 120 seconds, would it stop after the 12th line - after it has been running for 120 seconds?

I would test this but im not in a position too currently! :) thanks
 
From the PHP Manual:
Note:
max_execution_time only affects the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), the sleep() function, database queries, time taken by the file upload process, etc. is not included when determining the maximum time that the script has been running.
So assuming the non-system call stuff doesn't take longer than the 120 seconds, it will reach the end OK.

Hope this helps, null :)
 
Back
Top Bottom