PHP logical operators true false

The &&  and ||  logical operators seem to have more general recognition and background usage, although the and  and or  form of the same logical operators is taking more and more acceptation for the sake of readability.

So here is a list for the results when evaluating the expressions in PHP. I am sure that this can be applied to a bunch of other languages. (I think it is a little bit superficial to say that it apply to all programming language since I only know some of them).

Logical operator AND  ( && )

 

Logical operator OR  ( || )

 

Logical operator NOT  ( ! )

 

Leave a Reply

Your email address will not be published. Required fields are marked *