Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117572 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40734 invoked from network); 22 Apr 2022 15:38:35 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 22 Apr 2022 15:38:35 -0000 To: internals@lists.php.net Date: Fri, 22 Apr 2022 18:12:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-GB References: <6261d073.1c69fb81.a42c.d7cfSMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 149.241.131.223 Subject: Re: [PHP-DEV] [VOTE] Undefined Property Error Promotion From: marandall@php.net (Mark Randall) Message-ID: On 22/04/2022 14:42, Rowan Tommins wrote: > As with your previous RFC, I approve of this in principle, but am > frustrated how little time has been spent considering the edge cases, such > as the ones I mentioned here: https://externals.io/message/117487#117487 Accessing an unset property, which currently emits a warning, will instead throw an Error. If a property has already been written to via some mechanism, then the property exists and this RFC does not apply, no warning or error should be expected. It's a different responsibility to handle the guards against writing to one which has not been defined (AllowDynamicProperties RFC). Re: Case 4, an untyped property without its own initializer is effectively defaulted to null.