1

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,410
  • 3
  • 64
  • 90

1 Answers1

5

"||" 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
  • 689
  • 1
  • 7
  • 16