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

From: Date: Tue, 24 Aug 2010 21:26:09 +0000
Subject: Re: [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-49502@lists.php.net to get a copy of this message
On Tue, Aug 24, 2010 at 11:14:05AM -0700, Stas Malyshev wrote: > Hi! > > >use an E_ constant with error_reporting" and not have the current > >situation where sometimes you use a constant (or constants) and > >sometimes you use a bare number, depending on what you want to > >achieve. > > What's wrong with using 0? 0 means "nothing", how hard is that? ` Nothing wrong in using 0, but it would be much more elegant to stick to constants all from the same family. Someone already figured that out: $ php -r 'print_r(get_defined_constants());' | grep ' 0' | wc -l 89 Anyway, my opinion is I would like E_NONE in next major release, and I would also like E_ALL to be extended to include E_DEPRECATED and E_STRICT, instead of adding a really bogus E_DEVELOPMENT or E_EVERYTHING. Please also note that E_* indicates a single error channel, with the exception of E_ALL and possibly E_NONE if it gets added. I would avoid adding more E_* constants which don't represent a single channel. I would find it confusing. 2c -- Giovanni Giacobbi

« previous php.internals (#49502) next »