Re: [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

From: Date: Wed, 25 Aug 2010 17:47:08 +0000
Subject: Re: [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-49521@lists.php.net to get a copy of this message
David Zülke wrote: > > That's because you're doing it wrong: > > error_reporting(E_NONE | E_ERROR); > > - David > > You're correct that I did it wrong and I apologize. Your example is how it would be properly written out and it would work the way the programmer expects it. My point was that E_NONE has a different meaning than 0 - even if E_NONE==0. I've never seen "error_reporting(0 | E_ERROR);" because that's just silly. People who do understand bit masks would know it's useless, and people who don't would just copy off the internet from people who know better. In short, I don't want to see "error_reporting(E_NONE | E_ERROR);" in anybody's PHP code. Even if it is harmless. Maybe I'm just a little too wound up about such things, though. Just my two cents. -- Tyler Lawson

« previous php.internals (#49521) next »