And Operator¶
and
is the logical operator: it returns true
only when both operands are true
; otherwise, it returns false
.
It is synonym with the symbol and operator &&
, though it has a different precedence level.
There is also a bitwise and
operator: &
and
is a PHP keyword.
<?php
$a = 1 && 2;
?>
Related : Logical Operators, Bitwise Operators, Logical Operators, Keyword