0

Are in PHP the single | and the keyword OR equivalent?

Analogously, are the single & and the keyword AND equivalent?

user402843
  • 89
  • 1
  • 9
  • 3
    [No](https://www.php.net/manual/en/language.operators.precedence.php), the word operators are logical operators, not bitwise operators, so they'll work a bit differently. – aynber Mar 23 '22 at 18:11
  • 1
    https://stackoverflow.com/questions/2376348/difference-between-and-in-php has a bit more information. The previous link shows that `AND` and `OR` have a lower precedence than `&&` and `||`, but [work the same](https://www.php.net/manual/en/language.operators.logical.php) – aynber Mar 23 '22 at 18:14
  • Does this answer your question? [Difference between & and && in PHP](https://stackoverflow.com/questions/2376348/difference-between-and-in-php) – Abel Masila Mar 25 '22 at 10:34

0 Answers0