On 29.01.2017 at 20:33, Rowan Collins wrote: > Currently, if the constant FROB_ACTIVE is not defined, the code "echo > FROB_ACTIVE;" results in an E_NOTICE and the string 'FROB_ACTIVE' being > displayed. I would like to propose that this be changed to an E_WARNING > in PHP 7.2, and to an Error in PHP 8.0. > > My reasoning for this includes: > > - consistency with other "undefined" errors, including the otherwise > identical "echo \FROB_ACTIVE;" > - the fallback to string appears to be largely undocumented except to > discourage its use > - the error can mask serious bugs, such as when mis-typing keywords > > I have tried to anticipate some of the questions that will be raised, so > have drafted an RFC rather than trying to fit all the detail into one > e-mail: https://wiki.php.net/rfc/deprecate-bareword-strings > > Please read my proposal, and let me know your thoughts. I have placed > the RFC "under discussion", but will be happy to modify it based on > feedback, and am in no haste to put it to a vote.
Thanks for bringing this forward, Rowan! I'm +1 on the proposal by all accounts. -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php