Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49502 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49047 invoked from network); 24 Aug 2010 21:26:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2010 21:26:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=giovanni@giacobbi.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=giovanni@giacobbi.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain giacobbi.net from 95.110.130.42 cause and error) X-PHP-List-Original-Sender: giovanni@giacobbi.net X-Host-Fingerprint: 95.110.130.42 gerbil.thgnet.it Linux 2.5 (sometimes 2.4) (4) Received: from [95.110.130.42] ([95.110.130.42:60696] helo=gerbil.thgnet.it) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/A8-34028-6F8347C4 for ; Tue, 24 Aug 2010 17:26:15 -0400 Received: from johnny by gerbil.thgnet.it with local (Exim 4.69) (envelope-from ) id 1Oo10T-0005qp-62; Tue, 24 Aug 2010 23:26:09 +0200 Date: Tue, 24 Aug 2010 23:26:09 +0200 To: Stas Malyshev Cc: PHP internals Message-ID: <20100824212609.GF17963@gerbil.thgnet.it> References: <4C73F30A.8080007@sugarcrm.com> <4C7405A5.7040700@sugarcrm.com> <4C740BED.4080909@sugarcrm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C740BED.4080909@sugarcrm.com> User-Agent: Mutt/1.4.2.2i Subject: Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants From: giovanni@giacobbi.net (Giovanni Giacobbi) 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