||到底是什么意思是? [英] What exactly does || mean?
本文介绍了||到底是什么意思是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
return (empty($neededRole) || strcasecmp($role, 'admin') == 0 || strcasecmp($role, $neededRole) == 0);
||到底是什么?这句话是什么意思?有人可以帮我用英语写这个吗?
What exactly does the || mean in this statement? Can someone put this in english for me.
我保证我已经用谷歌搜索了,但是我想我不知道该用什么,因为我什么都找不到.
I promise I've googled this but I guess I don't know what to google for because I can't find anything.
谢谢:)
推荐答案
使用谷歌搜索符号总是很困难.不用担心:||
在语句中表示or
.不要将它与Xor
稍有不同:
Googling symbols is always hard. Don't worry: ||
means or
in the statement. Don't confuse it for Xor
which is slightly different:
-
or
或||
表示为A or B or A + B
-
xor
表示为A or B, not both
or
or||
is meant asA or B or A + B
xor
is meant asA or B, not both
参考文献:
这篇关于||到底是什么意思是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文