Re: [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants
| From: | Pierre Joye | Date: | Tue, 24 Aug 2010 13:46:20 +0000 |
| Subject: | Re: [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49489@lists.php.net to get a copy of this message | ||
hi,
On Tue, Aug 24, 2010 at 12:49 PM, Adam Harvey <aharvey@php.net> wrote:
> http://bugs.php.net/52563 suggests adding an E_NONE constant
> (set to 0) to
> go with the various other E_* constants we have. I've hacked up a quick
> patch against trunk (attached to the report) that would add that, but don't
> have Zend karma to add it, so I'll open it up to the floor: (a) should we
> have it, and (b) if so, can someone please commit it?
>
> Johannes has pointed out on IRC that E_NONE does already exist in some
> projects, so that's an argument against it.
I don't see it as an argument against as the fix is rather easy:
if (!defined('E_NONE')) {
...
But it should not be added in a minor release.
> Kalle also suggested another constant within that request to provide a
> symbolic version of error_reporting = -1, so there's a second patch in that
> report to add an E_EVERYTHING constant which acts as E_ALL once did: it
> turns on all error reporting.
>
> I'm not terribly attached to either the names or, indeed, the request in
> general, but it'd be nice to get this one closed one way or t'other.
I would like something like E_DEVELOPMENT (notices, warnings,
deprecated and the classic fatal), to strongly advice developers to
use it. On the same line, we could add E_PRODUCTION to set the error
reporting we recommend in production (fatal and warning).
Cheers,
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org