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!

Using a '0' makes it painfully obvious that it's not meant to combine
with the other predefined constants.  0 is special.  0 doesn't play
nicely with others.

This is obviously an edge case, and a less experienced developer would
hopefully learn very quickly the right way to do it, but I don't like
the idea of giving people ammo to shoot at PHP and its wacky E_* constants.

-- 
Tyler Lawson

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to