What is the difference between the 'BITWISE AND' operator and the 'LOGICAL AND' operator?

  • 'BITWISE AND' performs bitwise comparison of two operands, while 'LOGICAL AND' performs logical comparison of two operands
  • 'BITWISE AND' is a binary operator, while 'LOGICAL AND' is a unary operator
  • There is no difference, both operators perform the same operation
  • 'BITWISE AND' returns the result as a Boolean value, while 'LOGICAL AND' returns the result as an integer value
The 'BITWISE AND' operator (&) performs bitwise comparison of individual bits in two operands, while the 'LOGICAL AND' operator (&&) performs logical comparison of two Boolean expressions. Learn more: http://php.net/manual/en/language.operators.bitwise.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *