Re: [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants
| From: | David Zülke | Date: | Wed, 25 Aug 2010 14:17:50 +0000 |
| Subject: | Re: [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49515@lists.php.net to get a copy of this message | ||
On 25.08.2010, at 15:51, Tyler Lawson wrote:
> Sebastian Bergmann wrote:
>
>> So nobody will use E_DEVELOPMENT or E_NONE or whatever. We can only add
>> options to PHP that offer choices to developers. If they do not use
>> them ... what can we do?
>>
>
> As a regular user of PHP, I like the idea of E_DEVELOPMENT and
> E_PRODUCTION. They're clear and will do what I would expect them to.
> Why not change the default php.inis to those values instead?
>
> I'm a against E_NONE, though. Now, I understand what a bit mask is, but
> imagine for a second that I didn't. Imagine that I want no messages
> except for E_ERROR. As a theoretically less experienced developer, I
> might assume that I should explicitly turn off all errors except for
> E_ERROR. What does that get me? error_reporting(E_NONE & E_ERROR).
> Oops. That doesn't work as I expect it to!
That's because you're doing it wrong:
error_reporting(E_NONE | E_ERROR);
- David
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s