PHP - Operators
What will be the output of the following PHP code?
$a = true;
$b = false;
if ($a && !$b) {
echo 'Yes';
} else {
echo 'No';
}
$a = true;
$b = false;
if ($a && !$b) {
echo 'Yes';
} else {
echo 'No';
}
!$b becomes true.!$b is true, so $a && !$b is true.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions