does the condition after && always get evaluated

后端 未结 6 731
予麋鹿
予麋鹿 2020-12-03 02:48

I have this if statement that tests for the 2 conditions below. The second one is a function goodToGo() so I want to call it unless the first condi

6条回答
  •  旧时难觅i
    2020-12-03 02:55

    Yes. The two blocks are the same. PHP, like most (but not all) languages, uses short-circuit evaluation for && and ||.

提交回复
热议问题