〜运算符在这里是什么意思? [英] What does this ~ operator mean here?
本文介绍了〜运算符在这里是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
示例:
set_error_handler(array($this, 'handleError'), E_ALL & ~E_STRICT & ~E_WARNING & ~E_NOTICE);
那是什么意思?
推荐答案
它是按位而非运算符(也称为补语").也就是说,在~ $a
中设置的位是在$a
中未设置的位.
It is the bitwise not operator (also called "complement"). That is the bits set in ~ $a
are those that are not set in $a
.
那么
E_ALL & ~E_STRICT & ~E_WARNING & ~E_NOTICE
是在E_ALL
中设置的位,而在E_STRICT
,E_WARNING
和E_NOTICE
中未设置的位.这基本上表示所有错误,但严格错误,警告错误和注意错误除外.
is the bits set in E_ALL
and those not set in E_STRICT
, E_WARNING
and E_NOTICE
. This basically says all errors except strict, warning and notice errors.
这篇关于〜运算符在这里是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文