2

I'm just started with php. I used to use AND and OR but found out about && and ||, what is the difference of these operators?

ST3
  • 8,826
  • 3
  • 68
  • 92

1 Answers1

6

"||" has a greater precedence than "or"

"&&" has a greater precedence than "and"

From php manual, can read the full article here (Exemple1)

Community
  • 1
  • 1
Lan
  • 709
  • 1
  • 8
  • 16