Re: [VOTE] Undefined Variable Error Promotion

From: Date: Tue, 15 Mar 2022 19:07:52 +0000
Subject: Re: [VOTE] Undefined Variable Error Promotion
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-117338@lists.php.net to get a copy of this message
Christoph M. Becker wrote on 15/3/22 19:17:
On 15.03.2022 at 17:54, Côme Chilliet wrote:
Le lundi 14 mars 2022, 18:18:55 CET Mark Randall a écrit :
I have started the vote for promoting undefined variable access to throw an Error exception. The vote will run for 2 weeks until March 28th 2022. https://wiki.php.net/rfc/undefined_variable_error_promotion
This does not mention properties, are they concerned by the change? What about array keys?
The RFC states: | If the code does not currently emit a “Warning: Undefined variable | $varname” then it is out of scope for this RFC. This RFC does NOT | apply to array indexes. That explicitly excludes undefined array indexes, and apparently also excludes undefined properties (which raise "Warning: Undefined property:") AFAIU error promotion for undefined properties has already been covered by the Deprecate Dynamic Properties RFC <https://wiki.php.net/rfc/deprecate_dynamic_properties>, which will start throwing errors in 9.0.


« previous php.internals (#117338) next »