error_reporting(E_ALL)和error_reporting(E_ALL&〜E_NOTICE)有什么区别 [英] What are differences between error_reporting(E_ALL) and error_reporting(E_ALL & ~E_NOTICE)
问题描述
谁能解释error_reporting(E_ALL);
和error_reporting(E_ALL & ~E_NOTICE);
之间的区别?
Could anyone explain differences between error_reporting(E_ALL);
and error_reporting(E_ALL & ~E_NOTICE);
?
我注意到当我从E_ALL
更改为E_ALL & ~E_NOTICE
时,我正在破解的错误消失了.
I noticed that when I change from E_ALL
to E_ALL & ~E_NOTICE
, an error which I was hacking, disappears.
推荐答案
E_ALL是一切"
E_ALL is "everything"
E_ALL& 〜E_NOTICE是除通知外的所有内容"
E_ALL & ~E_NOTICE is "everything except notices"
通知是最不紧急的消息.但是它们对于捕获愚蠢的程序员错误非常有用,例如尝试使用不存在的键从哈希读取等.
Notices are the least-urgent kinds of messages. But they can be very useful for catching stupid programmer mistakes, like trying to read from a hash with a non-existent key, etc.
(要了解语法,请阅读按位运算符)
(To understand the syntax, read up on bitwise operators)
这篇关于error_reporting(E_ALL)和error_reporting(E_ALL&〜E_NOTICE)有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!