Home > Backend Development > PHP Tutorial > Logical operators_PHP tutorial

Logical operators_PHP tutorial

WBOY
Release: 2016-07-13 17:26:20
Original
921 people have browsed it

Table 7-3. Logical Operators (Table 7-3 Logical Operators)
 
example name result?/FONT>
$a and $b And True of both $a and $b are true.? /FONT>
$a or $b Or?/FONT> True if either $a or $b is true.?/FONT>
$a xor $b Or?/FONT> True if either $a or $b is true, but not both.?/FONT>
! $a Not?/FONT> True if $a is not true.?/FONT>
$a && $b And?/FONT> True of both $a and $b are true.?/FONT>
$a || $b Or?/FONT> True if either $a or $b is true.
Two different kinds of "and" and " The changes in the "or" operator are actually caused by the different priorities of the operations. (Refer to the following.)

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531974.htmlTechArticleTable 7-3. Logical Operators (Table 7-3 Logical Operators) example name result?/FONT> $ a and $b And True of both $a and $b are true.?/FONT> $a or $b Or?/FONT> True if either $a or $b...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template