Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-27 Thread Richard Quadling
On 26 August 2010 16:38, Patrick ALLAERT patrick.alla...@gmail.com wrote: 2010/8/26 Richard Quadling rquadl...@gmail.com: With all of I thought this sort of stuff was for Friday's only comments being made, I think E_ALL_AND_I_REALLY_REALLY_REALLY_DO_MEAN_ALL would be the most useful. Sorry

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-26 Thread Richard Quadling
On 25 August 2010 23:51, Ferenc Kovacs i...@tyrael.hu wrote: On Thu, Aug 26, 2010 at 12:43 AM, Ilia Alshanetsky i...@prohost.org wrote: Stas, Having E_FORTY_TWO would be super-useful ;-) offtopic: shouldn't be that E_ANSWER_TO_LIFE_UNIVERSE_AND_EVERYTHING? maybe we should set E_ALL for

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-26 Thread Patrick ALLAERT
2010/8/26 Richard Quadling rquadl...@gmail.com: With all of I thought this sort of stuff was for Friday's only comments being made, I think E_ALL_AND_I_REALLY_REALLY_REALLY_DO_MEAN_ALL would be the most useful. Sorry to contradict you, but the most useful would be that:

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Lester Caine
Johannes Schlüter wrote: On Tue, 2010-08-24 at 18:49 +0800, Adam Harvey wrote: Johannes has pointed out on IRC that E_NONE does already exist in some projects, so that's an argument against it. Yeah, I did a quick code search, which gave some results defining a constant with that name. This

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Tjerk Anne Meesters
On Wed, Aug 25, 2010 at 2:22 PM, Lester Caine les...@lsces.co.uk wrote: Johannes Schlüter wrote: On Tue, 2010-08-24 at 18:49 +0800, Adam Harvey wrote: Johannes has pointed out on IRC that E_NONE does already exist in some projects, so that's an argument against it. Yeah, I did a quick code

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Derick Rethans
On Tue, 24 Aug 2010, Adam Harvey wrote: I'd be happy enough with E_DEVELOPMENT instead of E_EVERYTHING. The point is that everything should be on — we should be encouraging developers to fix up E_STRICT notices as well as the usual array of things E_ALL shows. Don't we already have this with

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Sebastian Bergmann
On 08/25/2010 03:07 PM, Derick Rethans wrote: Don't we already have this with the default two php.inis we have in some form? Yes, we do. And I, for one, also do not see the point for new E_* constants. -- Sebastian BergmannCo-Founder and Principal Consultant

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Pierre Joye
On Wed, Aug 25, 2010 at 3:34 PM, Sebastian Bergmann sebast...@php.net wrote: On 08/25/2010 03:07 PM, Derick Rethans wrote: Don't we already have this with the default two php.inis we have in some form?  Yes, we do. And I, for one, also do not see the point for new E_*  constants. Nobody

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Sebastian Bergmann
On 08/25/2010 03:38 PM, Pierre Joye wrote: Nobody uses the recommendation in the two php.inis. 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? -- Sebastian Bergmann

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Pierre Joye
On Wed, Aug 25, 2010 at 3:44 PM, Sebastian Bergmann sebast...@php.net wrote: On 08/25/2010 03:38 PM, Pierre Joye wrote: Nobody uses the recommendation in the two php.inis.  So nobody will use E_DEVELOPMENT or E_NONE or whatever. We can only add  options to PHP that offer choices to

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Tyler Lawson
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

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread David Zülke
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

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Kalle Sommer Nielsen
Hi 2010/8/24 Adam Harvey ahar...@php.net: 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.

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Tyler Lawson
David Zülke wrote: That's because you're doing it wrong: error_reporting(E_NONE | E_ERROR); - David You're correct that I did it wrong and I apologize. Your example is how it would be properly written out and it would work the way the programmer expects it. My point was that

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Jordi Boggiano
On Wed, Aug 25, 2010 at 7:47 PM, Tyler Lawson ty...@n49.com wrote: In short, I don't want to see error_reporting(E_NONE | E_ERROR); in anybody's PHP code. Even if it is harmless. What I don't want to see is E_NONE as a string [1]. Also people, why does every little detail like a goddamn

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Ilia Alshanetsky
Stas, Having E_FORTY_TWO would be super-useful ;-) On Tue, Aug 24, 2010 at 1:47 PM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! Rhetorical question: Why do we need constants when the values never change? :) You seriously don't know why one needs constants or don't see a difference

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Pierre Joye
On Thu, Aug 26, 2010 at 12:43 AM, Ilia Alshanetsky i...@prohost.org wrote: Stas, Having E_FORTY_TWO would be super-useful ;-) FOURTY! Only to annoy all English teachers out there :) -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-25 Thread Ferenc Kovacs
On Thu, Aug 26, 2010 at 12:43 AM, Ilia Alshanetsky i...@prohost.org wrote: Stas, Having E_FORTY_TWO would be super-useful ;-) offtopic: shouldn't be that E_ANSWER_TO_LIFE_UNIVERSE_AND_EVERYTHING? maybe we should set E_ALL for 42 too. :) -1 for E_DEVELOPMENT E_PRODUCTION E_EVERYTHING +1 for

[PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Adam Harvey
Folks, 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)

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Pierre Joye
hi, On Tue, Aug 24, 2010 at 12:49 PM, Adam Harvey ahar...@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

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Adam Harvey
On 24 August 2010 21:46, Pierre Joye pierre@gmail.com wrote: 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. Agreed. To be clear: the patch is against trunk, and I wouldn't suggest it even be

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Stas Malyshev
Hi! 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 I'm kind of confused - why we need E_NONE? In case value of 0 should ever change? -- Stanislav Malyshev, Software Architect SugarCRM:

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Pierre Joye
On Tue, Aug 24, 2010 at 6:27 PM, Stas Malyshev smalys...@sugarcrm.com 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 I'm kind of confused - why we need E_NONE? In case value of 0 should

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Stas Malyshev
Hi! Rhetorical question: Why do we need constants when the values never change? :) You seriously don't know why one needs constants or don't see a difference between constant E_WARNING equal to 8 and constant E_NONE meaning nothing and equal to 0? How about having constants ONE, TWO,

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Adam Harvey
On 25 August 2010 01:47, Stas Malyshev smalys...@sugarcrm.com wrote: You seriously don't know why one needs constants or don't see a difference between constant E_WARNING equal to 8 and constant E_NONE meaning nothing and equal to 0? How about having constants ONE, TWO, THREE, FOUR? Just in

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Pierre Joye
On Tue, Aug 24, 2010 at 7:47 PM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! Rhetorical question: Why do we need constants when the values never change? :) You seriously don't know why one needs constants or don't see a difference between constant E_WARNING equal to 8 and constant

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Stas Malyshev
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? ` -- Stanislav

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Alexey Zakhlestin
On Tue, Aug 24, 2010 at 10:14 PM, Stas Malyshev smalys...@sugarcrm.com 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

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Johannes Schlüter
On Tue, 2010-08-24 at 18:49 +0800, Adam Harvey wrote: Johannes has pointed out on IRC that E_NONE does already exist in some projects, so that's an argument against it. Yeah, I did a quick code search, which gave some results defining a constant with that name. This means adding this in 5.3

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Pierre Joye
On Tue, Aug 24, 2010 at 8:14 PM, Stas Malyshev smalys...@sugarcrm.com 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

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Johannes Schlüter
On Tue, 2010-08-24 at 22:23 +0400, Alexey Zakhlestin wrote: The only downside is, that programmer will need to know, that E_* constants do mean numbers. With adding E_NONE this knowledge would be unnecessary and people would be able just to think in terms of abstract symbols Users should be

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Giovanni Giacobbi
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

Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants

2010-08-24 Thread Nicolas A . Bérard-Nault
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 giova...@giacobbi.netwrote: On Tue, Aug 24, 2010 at 11:14:05AM -0700, Stas Malyshev wrote: Hi! use an E_ constant with error_reporting and not