Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103085 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60907 invoked from network); 12 Aug 2018 10:35:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2018 10:35:34 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.19 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.19 mout.gmx.net Received: from [212.227.15.19] ([212.227.15.19:49857] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/C4-32660-27D007B5 for ; Sun, 12 Aug 2018 06:35:31 -0400 Received: from [192.168.2.102] ([87.167.201.185]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M8ehf-1g339R0ZYB-00wEJc; Sun, 12 Aug 2018 12:35:26 +0200 To: Stanislav Malyshev , Sara Golemon , PHP internals References: <03a9b282-1a46-c2a6-6987-0f2778f99be4@gmx.de> Message-ID: <2fd27c4a-3224-81e9-6917-16caec715a6e@gmx.de> Date: Sun, 12 Aug 2018 12:35:27 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:xaG6E9NnoAmS4SRZtF93qvZeQIOtA8fyNZwwwsGimWbxSOVb2y1 /M3aswyqGgf0F3iFf0A0xJ9aN0m1rs/FjqitcKs0efDSaGxryjQrh/VShtZPx/D8v0+TsCj G6bp25R+hRrFD2cn/TCtpGl1ONjpmNgyC9/RHUXE8odunsIr2Qo12Nex7lgoL+kMdCgk/XF AO3D9Mx6LiVRD8Eo2WXCg== X-UI-Out-Filterresults: notjunk:1;V01:K0:8izjUxyE/RI=:2eSvJBjn7JbVr79prCt6L+ xOgybIgoauylNTHhd/cbHjVPoDOO3Kc+apemoUEcqKXMoSUFJ//3lhi69n1NAnyh2OP1uodHr hlMYROnamphH6ceF3n9Jfg7kEq7RLoLK+tfoe75+FIr2c52adGF/SzezVsJGpZxeN9k82ds1I iCevy60P1+QFpaTqGPYGkdaptzx80Y1YigvznxcmQSn9vzzo+YwCJJTHtD92zCftyrtGXUIFt 3OfzE2iC92hEFxKzKnHJCitzxP0k14iN1YEDvAz9dmWI6zuZxqF7M1Ps5pGAlX4l+Ufqo+ajh rnxJXBHlqGFuIAiqHaU+mks3bE2h0W+K3m02llImBGshtxKbUZrYBnaUz6k2On8KIP7mWpa57 3wrMdbEsI6QeI9rZqwMM5DqsH77MdeuEYJymIEgq/L249FpTZLQ7HWo2i8o9eMs82qwKkbe0O WmIKBfb0YcNvyhaFK6Ha2VhOguvyOEDW4VbnlQbI6pjVg2lBlOcslhPh4bTLu16GlxE1Ql5+N Pi5QTr/7J6NXePvovGIsWXhY5l+y6XXOoRZnTJom4nhNaSZJ4dWZMhJD7bVA9hxmJFS8lwhVi OwviJEalVpD/ze4rShDX6SP6mkDBlbYg8594Zxv0IrOHz4XqQ/2WJNr9yz6SZy93iJGsHc2qr 0MuTBqHkx1VhWGHviYuy8r5MXz8gXgzG5A6mjJ6ZIoAC1z55zxnagg7dYQjqY9gZ5zt0vrpOb k83Wg4w1jfY+EfZfwkkfQ6uRw3dbPZKEd3+c0I+7ejVcp0AlPVC6E0EGvFb7QBMZnDSGLMdV2 +Chu87t Subject: Re: [PHP-DEV] Re: The curious case of the comparable objects. From: cmbecker69@gmx.de ("Christoph M. Becker") On 12.08.2018 at 07:47, Stanislav Malyshev wrote: >> > > Ah, I forgot that the spec did define it via array comparison. The spec > also says in > https://github.com/php/php-langspec/blob/master/spec/08-conversions.md#converting-to-array-type: > > The order of insertion of the elements into the array is the lexical > order of the instance properties in the class-member-declarations list. > > It does not explicitly say array conversion using when comparing, but > reasonable reader would certainly assume so. Ah, thanks! However, the given example[1] does not violate the spec, since the spec says nothing about the order of inherited properties. Users may rely on a certain order, so the spec should at least state expicitly that the order of inherited properties is undefined. It might be preferable, though, to actually specify the order of inherited properties (first child, then parent, then grandparent, etc.) Also the spec should either define the order of runtime-created properties, or declare the order to be undefined. And the spec should not forget about properties of “use”d traits… [1] -- Christoph M. Becker