PHP logical operators
PHP logical operators
Logical Operators:
- AND (&& or and)
- OR (|| or or)
- NOT (! or not)
- XOR (exclusive OR) (xor)
PHP logical operators
Example :-
<?php
$a=10;
$b=5;
$c=20;
$d=20;
var_dump(($a<$c)&&($c==$d)&&($b<$c));//true
var_dump(!(($a<$c)&&($c==$d)&&($b<$c)));//false
var_dump(($a>$d)||($b<$c));//true
?>
Post a Comment