Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Rowan Collins
Ferenc Kovacs wrote on 28/01/2015 16:42: On Wed, Jan 28, 2015 at 4:42 PM, Rowan Collins mailto:rowan.coll...@gmail.com>> wrote: Ferenc Kovacs wrote on 28/01/2015 12:13: E_DEPRECATED is likely to be even more ignored than E_NOTICE, so would be a step back

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Ferenc Kovacs
On Wed, Jan 28, 2015 at 4:42 PM, Rowan Collins wrote: > Ferenc Kovacs wrote on 28/01/2015 12:13: > >> >> E_DEPRECATED is likely to be even more ignored than E_NOTICE, so >> would be a step backwards; my whole assumption is that most people >> getting the message are not using a deprec

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Rowan Collins
Ferenc Kovacs wrote on 28/01/2015 12:13: ok, I was assuming that by turning it into E_RECOVERABLE_ERROR you would still keep the assuming string behavior if there is a custom error handler which returns true for this error. I'm undecided on whether the string value or null would make more se

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Rowan Collins
Ferenc Kovacs wrote on 28/01/2015 12:13: E_DEPRECATED is likely to be even more ignored than E_NOTICE, so would be a step backwards; my whole assumption is that most people getting the message are not using a deprecated feature, but accidentally mis-typing a constant or keyword.

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Ferenc Kovacs
On Wed, Jan 28, 2015 at 11:48 AM, Rowan Collins wrote: > Ferenc Kovacs wrote on 28/01/2015 07:20: > >> >> >> 2015.01.28. 6:04 ezt írta ("François Laupretre" > >): >> > >> > > De : Rowan Collins [mailto:rowan.coll...@gmail.com > rowan.coll...@gmail.com>] >> > > I would

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Andrey Andreev
HI, On Wed, Jan 28, 2015 at 12:34 PM, Rowan Collins wrote: > Benjamin Eberlei wrote on 28/01/2015 08:43: >> >> I think this is too big a BC break. >> >> The usage of $array[key] = 0 instead of "key" is widespread. > > > As I mentioned, the advice *not* to write that has been in the manual since >

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Yasuo Ohgaki
Hi Rowan, On Wed, Jan 28, 2015 at 7:48 PM, Rowan Collins wrote: > On the other hand, if the concern is having to support it, then it could > just be E_ERROR. The reason I chose E_RECOVERABLE_ERROR is because that had > recently been adopted for other things, such as invalid method calls. As I >

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Rowan Collins
Ferenc Kovacs wrote on 28/01/2015 07:20: 2015.01.28. 6:04 ezt írta ("François Laupretre" >): > > > De : Rowan Collins [mailto:rowan.coll...@gmail.com ] > > I would like to propose that the error given for an undefined constant > >

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Rowan Collins
Benjamin Eberlei wrote on 28/01/2015 08:43: I think this is too big a BC break. The usage of $array[key] = 0 instead of "key" is widespread. As I mentioned, the advice *not* to write that has been in the manual since 2001, so I can't think why any tutorial or example code would teach it as t

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Benjamin Eberlei
On Tue, Jan 27, 2015 at 11:21 PM, Rowan Collins wrote: > Hi All, > > I would like to propose that the error given for an undefined constant > should be raised from E_NOTICE, probably to E_RECOVERABLE_ERROR, in PHP 7. > > I'm happy to expand this into a proper RFC, and work on patches for the > en

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-27 Thread Yasuo Ohgaki
Hi Rowan, On Wed, Jan 28, 2015 at 7:21 AM, Rowan Collins wrote: > What do people think? I would like to vote +1 for this indeed. My concern is that there are too many users ignore E_NOTICE. Use of undefined constant is fatal error IMHO, though. I will not vote and let people decide. Regards,

RE: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-27 Thread Ferenc Kovacs
2015.01.28. 6:04 ezt írta ("François Laupretre" ): > > > De : Rowan Collins [mailto:rowan.coll...@gmail.com] > > I would like to propose that the error given for an undefined constant > > should be raised from E_NOTICE, probably to E_RECOVERABLE_ERROR, in > > PHP 7. > > +1 > I don't like that. Dep

RE: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-27 Thread François Laupretre
> De : Rowan Collins [mailto:rowan.coll...@gmail.com] > I would like to propose that the error given for an undefined constant > should be raised from E_NOTICE, probably to E_RECOVERABLE_ERROR, in > PHP 7. +1 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-27 Thread Andrea Faulds
Hey Rowan, I actually was thinking about doing this myself, if function/constant autoloading passed. That would mean that if you really needed this behaviour for some reason, you could write a constant autoloader that reimplements it. One concern I’d have is the use of constants in constant sca

[PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-27 Thread Rowan Collins
Hi All, I would like to propose that the error given for an undefined constant should be raised from E_NOTICE, probably to E_RECOVERABLE_ERROR, in PHP 7. I'm happy to expand this into a proper RFC, and work on patches for the engine, tests, and spec, but want to see if initial reception to th