What it says above. Unsurprisingly, I couldn’t find a clear answer to this.
I just want to know if calling it more than once in a script will cause a problem.
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.
Quoting the manual :
So, it will not do much — except raise a notice, which indicates there is some kind of a problem ; which means you should not call this function more than once.
Edit after @hakre’s comment : Just to be sure, I’ve tested with the following portion of code, which calls session_start() twice, after making sure errors and notices get reported :
And I do get the following notice :