Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49494 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19302 invoked from network); 24 Aug 2010 17:53:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2010 17:53:52 -0000 Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain adamharvey.name from 209.85.216.42 cause and error) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:52362] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/63-34028-F27047C4 for ; Tue, 24 Aug 2010 13:53:51 -0400 Received: by qwb8 with SMTP id 8so6948205qwb.29 for ; Tue, 24 Aug 2010 10:53:49 -0700 (PDT) Received: by 10.229.204.169 with SMTP id fm41mr3616470qcb.259.1282672421245; Tue, 24 Aug 2010 10:53:41 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.229.62.84 with HTTP; Tue, 24 Aug 2010 10:53:21 -0700 (PDT) In-Reply-To: <4C7405A5.7040700@sugarcrm.com> References: <4C73F30A.8080007@sugarcrm.com> <4C7405A5.7040700@sugarcrm.com> Date: Wed, 25 Aug 2010 01:53:21 +0800 X-Google-Sender-Auth: -ccQA_9VB49--nbP9DU39kS1R_8 Message-ID: To: Stas Malyshev Cc: Pierre Joye , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants From: aharvey@php.net (Adam Harvey) On 25 August 2010 01:47, Stas Malyshev wrote: > You seriously don't know why one needs constants or don't see a differenc= e between constant E_WARNING equal to 8 and constant E_NONE meaning "nothin= g" and equal to 0? How about having constants ONE, TWO, THREE, FOUR? Just i= n case, won't hurt anybody, right? :) Daily WTF is that way. :) I didn't lodge the original request, but I thought the reasoning behind E_NONE was pretty clear: it's pointless, sure, but it visually lines up with the other E_ constants. At that point, you can just make the advice when helping out PHP developers on support forums "always 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. Aside from the potential conflict issue Johannes noted, I thought it seemed pretty harmless. Adam