I have just a question… I’m seeing this coding style in various php scripts and don’t understand what this means… Could someone explain me this^^
example code:
empty($config) OR $this->initialize($config);
or this
$url AND $this->create($url);
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.
That about the OR operator : if 1st condition is true, then PHP won’t bother to execute 2nd: knowing that the 1st is true is enough to return true.
You can do the same for and (except it’s the opposite of course: if 1st condition is false, PHP won’t interpret 2nd)
This
Is a shortcut for
And
for