Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117644 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50445 invoked from network); 28 Apr 2022 15:24:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Apr 2022 15:24:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9162018037E for ; Thu, 28 Apr 2022 10:00:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 28 Apr 2022 10:00:15 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 712F75C00EA for ; Thu, 28 Apr 2022 13:00:14 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute1.internal (MEProxy); Thu, 28 Apr 2022 13:00:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm1; t=1651165214; x=1651251614; bh=5sic4Z2UWNQ34t5FIZTBkCn+2 pEyiLerV35Q8bwXoIg=; b=syIEXGJATPyAzCybwjoV12MBVo0KwPdjMIWB7LGhQ XoE2MuOS3i+X9mipIiK2bR4VUXI3crlNuVXu96DVUKKybYUySmKKDVjVGJF5Y9Bi O/UzniU3MbeDx6W0Wcs3amm9II8c2Dcv2Yg8SvA2yhVKnbzE/DnUjfuElyxCRn4t SszJ63eL356CdA8smxV/jtNSumayydRHEsFdbagl8MlXCkimXaZ6zclY5HaKuBBd aTNXtwl12PZl2fYZVxWtfy7s6Cs/UrRAXO7WXJnsRGcmWpvtWL7yRjlM07PxwWib /7HNbgdZOPlYmAGxwdUWF3QIkhtIDUg7AsKR4Fl0ogmDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1651165214; x=1651251614; bh=5sic4Z2UWNQ34t5FIZTBkCn+2pEy iLerV35Q8bwXoIg=; b=quB5ATnhspS51VkNahJsleh7egs/zJ3A1qRk3ls55x35 rf6xnByvK10ivZnnq45onrr0dAJ3dw0nAIuBHhpyXS0T0r3oqQ0pk33/iKWJdWFb eb4ZoAsCmTA8P7zujdIf7qUqrYWEm8z9BGtnV44txXvXkTMZfhDg/m+FqsTkaH2o w1wb621vtwyDTnGPdEEhHCBW0v9jDcZWjZtIYfadGPyriZeQNRdEgk5+vB2Aghm4 elNRmxtI88SvwIfyplh7VSUCA06v2pevJEJc9yjg4djqlJ2vlBBQBSrXQhBMSe+u +N43LD63s8Hn4Gdc7wGwlYyRjLY5a/KdVuRaS/ZHBQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejgddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goufhushhpvggtthffohhmrghinhculdegledmnecujfgurhepofgfggfkjghffffhvffu tgfgsehtqhertderreejnecuhfhrohhmpedfnfgrrhhrhicuifgrrhhfihgvlhgufdcuoe hlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqnecuggftrfgrthhtvghrnhep keekheeludfgheehgeekfeevtdevtdetffejhfetgfethfejudetieeiffdvjefgnecuff homhgrihhnpeefvheglhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1FB40AC0E98; Thu, 28 Apr 2022 13:00:14 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27 Mime-Version: 1.0 Message-ID: <02b3b90b-f6c9-457a-86e5-0d6549c8b7dd@www.fastmail.com> In-Reply-To: <11967803.O9o76ZdvQC@come-prox15amd> References: <6261d073.1c69fb81.a42c.d7cfSMTPIN_ADDED_MISSING@mx.google.com> <2bf2433e-2a4d-7523-7633-0e67a22a0c26@gmail.com> <11967803.O9o76ZdvQC@come-prox15amd> Date: Thu, 28 Apr 2022 11:59:53 -0500 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Undefined Property Error Promotion From: larry@garfieldtech.com ("Larry Garfield") On Thu, Apr 28, 2022, at 9:05 AM, C=C3=B4me Chilliet wrote: > Le lundi 25 avril 2022, 18:19:33 CEST Rowan Tommins a =C3=A9crit : >> Look at how the untyped property behaves in this example:=20 >> https://3v4l.org/nClNs The property disappears from var_dump(), but i= s=20 >> not actually deleted from the object, as seen by it still being priva= te=20 >> when assigned a new value. Given that we have the magic "uninitialize= d"=20 >> state, and we're proposing to make reading an unset property an error= ,=20 >> it would make more sense for it to show as '["untyped":"Foo":private]= =3D>=20 >> uninitialized(mixed)' > > I second that it would make sense for an untyped property to behave th= e=20 > same as a typed one with type mixed. > Getting a behavior change by adding a mixed typing to an untyped=20 > property is highly unexpected. > > C=C3=B4me Changing the logic so that untyped properties are essentially a shorthan= d for typing mixed (like no-visibility is a shorthand for public) could = be beneficial in the long run. It would be more consistent, and with th= e robustness around null-based tooling now that also works with undefine= d, it would probably not be too drastic a break if people knew to prepar= e for it (vis, happen in 9). I could get behind that, but that should b= e its own separate RFC. --Larry Garfield