Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49504 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77335 invoked from network); 25 Aug 2010 02:38:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2010 02:38:54 -0000 Authentication-Results: pb1.pair.com header.from=nicobn@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=nicobn@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: nicobn@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-wy0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:60990] helo=mail-wy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/6C-34028-C32847C4 for ; Tue, 24 Aug 2010 22:38:52 -0400 Received: by wyf19 with SMTP id 19so96693wyf.29 for ; Tue, 24 Aug 2010 19:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=wvkc74pvg5O4KqZnVmrFmiUTtXrT6ho/sZxvREBIejY=; b=Nk+pK+4vPkAGlJ2jYmKFAMJ1JS4b7SpMroYAN8bxmSkkORzTpH9yWoqCDmAkkrsUGx 5nRxT063adSQFklpjq3YI4so9FmxHfE6oANhjXuq2ptPu1mo0gJVP0LoqQiqWhwJzUf2 N/GQqe7EAHWTx08/z/l9bZigSyWhdNsXnX5VY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=INlfrK93NKtjCi/jMnOlpQBBHkcXoHUZ0MSlf5U6T1pO7hXp8J2zKAn3tazr+qq6wj BN5365cHstkr4JB27mrnncTltKx6P3GbX/TSafxjQGTedhTiwmpz5tVxAFAmjfabUI2Q wwegrahLelcvCZbtsGs9RxiblXyVFN1sgW6Gw= MIME-Version: 1.0 Received: by 10.227.37.8 with SMTP id v8mr6819921wbd.37.1282703929416; Tue, 24 Aug 2010 19:38:49 -0700 (PDT) Received: by 10.216.70.147 with HTTP; Tue, 24 Aug 2010 19:38:49 -0700 (PDT) In-Reply-To: <20100824212609.GF17963@gerbil.thgnet.it> References: <4C73F30A.8080007@sugarcrm.com> <4C7405A5.7040700@sugarcrm.com> <4C740BED.4080909@sugarcrm.com> <20100824212609.GF17963@gerbil.thgnet.it> Date: Tue, 24 Aug 2010 22:38:49 -0400 Message-ID: To: Giovanni Giacobbi Cc: Stas Malyshev , PHP internals Content-Type: multipart/alternative; boundary=002215974c5a109ada048e9cc855 Subject: Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants From: nicobn@gmail.com (=?ISO-8859-1?Q?Nicolas_A=2E_B=E9rard=2DNault?=) --002215974c5a109ada048e9cc855 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable http://thedailywtf.com/Articles/Avoiding-Magic-Constants.aspx I'm sorry, I could not resist. On Tue, Aug 24, 2010 at 5:26 PM, Giovanni Giacobbi w= rote: > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Nicolas A. B=E9rard-Nault (nicobn@gmail.com) --002215974c5a109ada048e9cc855--