当前位置:Gxlcms > PHP教程 > 逻辑操作符_PHP教程

逻辑操作符_PHP教程

时间:2021-07-01 10:21:17 帮助过:21人阅读

Table 7-3. Logical Operators(表7-3 逻辑操作符)
 
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.
两种不同“and”和“or”操作符的变化实际上是由于操作的不同优先级别而造成的。(参考以下内容。)

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/531974.htmlTechArticleTable 7-3. Logical Operators(表7-3 逻辑操作符) 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...

人气教程排行