PHP中的惊叹号是什么意思? [英] What does the exclamation point mean in PHP?
本文介绍了PHP中的惊叹号是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在PHP中有什么区别:
In PHP what is the difference between:
if(!isset)
if(isset)
与相同if(!empty)
和 if(空)
?
!是什么字符是什么意思?
What does the "!" character mean?
推荐答案
!
是逻辑否定或不
运营商。它颠倒了逻辑测试的意义。
!
is the logical negation or NOT
operator. It reverses the sense of the logical test.
即:
-
if(isset)
如果isset
是逻辑True
。 -
if(!isset)
如果isset
合乎逻辑错误
。
if(isset)
makes something happen ifisset
is logicalTrue
.if(!isset)
makes something happen ifisset
is logicalFalse
.
有关运营商的更多信息(逻辑和 PHP文档。)查找!
在那里巩固你对它的作用的理解。当你在那里时,也要查找其他逻辑运算符:
More about operators (logical and other types) in the PHP documentation. Look up !
there to cement your understanding of what it does. While you're there, also look up the other logical operators:
-
&&
逻辑AND -
||
逻辑或 -
xor
逻辑EXCLUSIVE-OR
&&
logical AND||
logical ORxor
logical EXCLUSIVE-OR
逻辑语句中也常用。
这篇关于PHP中的惊叹号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文