Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117639 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31022 invoked from network); 28 Apr 2022 12:30:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Apr 2022 12:30:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B5076180054 for ; Thu, 28 Apr 2022 07:05:53 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29169 217.70.176.0/20 X-Spam-Virus: No X-Envelope-From: Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 28 Apr 2022 07:05:52 -0700 (PDT) Received: (Authenticated sender: come@chilliet.eu) by mail.gandi.net (Postfix) with ESMTPSA id E47E4100006 for ; Thu, 28 Apr 2022 14:05:50 +0000 (UTC) To: internals@lists.php.net Date: Thu, 28 Apr 2022 16:05:50 +0200 Message-ID: <11967803.O9o76ZdvQC@come-prox15amd> In-Reply-To: <2bf2433e-2a4d-7523-7633-0e67a22a0c26@gmail.com> References: <6261d073.1c69fb81.a42c.d7cfSMTPIN_ADDED_MISSING@mx.google.com> <2bf2433e-2a4d-7523-7633-0e67a22a0c26@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [PHP-DEV] [VOTE] Undefined Property Error Promotion From: come@chilliet.eu (=?ISO-8859-1?Q?C=F4me?= Chilliet) Le lundi 25 avril 2022, 18:19:33 CEST Rowan Tommins a =E9crit : > Look at how the untyped property behaves in this example:=20 > https://3v4l.org/nClNs The property disappears from var_dump(), but is=20 > not actually deleted from the object, as seen by it still being private=20 > when assigned a new value. Given that we have the magic "uninitialized"=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 the sam= e as a typed one with type mixed. Getting a behavior change by adding a mixed typing to an untyped property i= s highly unexpected. C=F4me