Logical Operators in PHP

Operator   How to Use What does it do?
and

 

&&

And $a>1and $b<1 Output is True if both conditions are true
or

 

||

Or $a>1or $b<1 Output is True if either condition 1  is true or condition 2 is true
Xor

 

Exclusive Or

Xor $a>1 xor $b<1 Output is True if either condition 1  is true or condition 2 is true, but not both
! Not !$a > 1 Output is True if condition is not true

Contact Us – 954241494 for enquiry of PHP Training.

Leave a Comment