Ferenc Kovacs wrote on 28/01/2015 07:20:


2015.01.28. 6:04 ezt írta ("François Laupretre" <franc...@tekwire.net <mailto:franc...@tekwire.net>>):
>
> > De : Rowan Collins [mailto:rowan.coll...@gmail.com <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.
Depending if we want to keep the behavior on the long term I would either go with E_WARNING or E_DEPRECATED Turning it into E_RECOVERABLE_ERROR would be for most users just as bad as removing it while we still have to support the behavior so no real gain for us.


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. I'd be happy with raising it to E_WARNING to make it more noticeable, though, if we don't think removing the functionality is acceptable.

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 mentioned in my original e-mail, the recovery behaviour needn't be the existing string interpretation, but could just be to treat the value as NULL, which would probably be simpler to implement. Personally, I've never actually recovered an E_RECOVERABLE_ERROR, so am not sure what use cases we should be supporting.

Regards,
--
Rowan Collins
[IMSoP]

Reply via email to