In PHP if I set the the memory 100M via ini_set and then I set set_time_limit(0); Does that mean that my PHP memory allocation is 100M forever(Until I restart my Apache)?
In PHP if I set the the memory 100M via ini_set and then I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No its reset back to the original at the end of script execution.
From the manual:
and
set_time_limit(0);is treated the same.Example:
With
set_time_limit(0);it just tells the script to not time out, tho say you were to useset_time_limit(0);within a loop then on each iteration its internal counter is set to 0 over and over.So if you were to use
set_time_limit(1);within a loop as long as each iteration of the loop did not last longer then 1 second then it would still not time out asset_time_limit(n);would reset the internal timeout counter to 0 on each iteration.Example of it not timing out after 1 second: