php logical and code example
Example 1: php or
$num1 = 5;
$num2 = 10;
$num1 === 5 or $num2 === 6;
// Shorthand
$num1 === 5 || $num2 === 6;
Example 2: logical operator php
OPERATOR NAME EXAMPLE
and And $x and $y
or Or $x or $y
xor Xor $x xor $y
&& And $x && $y
|| Or $x || $y
! Not !$x