Developer Forums | About Us | Site Map
Search  
HOME > PHPMANUAL


Sponsors





Web Host
site hosted by netplex
Partners

Online Manuals

Logical Operators

Table 10-6. Logical Operators

ExampleNameResult
$a and $bAndTRUE if both $a and $b are TRUE.
$a or $bOrTRUE if either $a or $b is TRUE.
$a xor $bXorTRUE if either $a or $b is TRUE, but not both.
! $aNotTRUE if $a is not TRUE.
$a && $bAndTRUE if both $a and $b are TRUE.
$a || $bOrTRUE if either $a or $b is TRUE.

The reason for the two different variations of "and" and "or" operators is that they operate at different precedences. (See Operator Precedence.)

Copyright 2004-2024 GrindingGears.com. All rights reserved. Site hosted by NETPLEX