Compare two values with Logical operators

In PHP, Logical operators perform conditional and, or, and not operations. This also called Bitwise operators. Some Bitwise operators as follows

$a && $b
Value required for $a and $b.
$a || $b
Value required for $a or $b.
$a xor $b
Value required for $a or $b (not both are set)
! $a
Value of $a must be FALSE (No any value)
Compare value of two variable $a and $b using PHP
<?php
$a = 8;
$b = 4;
if($a==8 && $b==4} {
    echo “Logical condition is true.”;
} else {
     echo “Logical condition is false.”
}
?>

Output : Logical condition is true..