Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112392 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 9814 invoked from network); 3 Dec 2020 09:12:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Dec 2020 09:12:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2FC911804DD for ; Thu, 3 Dec 2020 00:40:29 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from smtp-in.fusiondirectory.org (smtp-in.geekview.be [195.154.20.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 3 Dec 2020 00:40:28 -0800 (PST) Received: from smtp-in.fusiondirectory.org (localhost.localdomain [127.0.0.1]) by smtp-in.fusiondirectory.org (Proxmox) with ESMTP id 00B6E1016D6 for ; Thu, 3 Dec 2020 09:40:27 +0100 (CET) Received: from smtp.fusiondirectory.org (smtp.fusiondirectory.org [195.154.20.141]) by smtp-in.fusiondirectory.org (Proxmox) with ESMTP id D33B6101658 for ; Thu, 3 Dec 2020 09:40:26 +0100 (CET) Received: from mcmic-probook.opensides.be (63.120.199.77.rev.sfr.net [77.199.120.63]) by smtp.fusiondirectory.org (Postfix) with ESMTPSA id 9396C25EAF4 for ; Thu, 3 Dec 2020 09:40:26 +0100 (CET) Date: Thu, 3 Dec 2020 09:40:25 +0100 To: PHP internals Message-ID: <20201203094025.33e43be4@mcmic-probook.opensides.be> In-Reply-To: References: Organization: FusionDirectory X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Suggestion: Inconsistency: Allow array spread operator to work on string keys From: come.chilliet@fusiondirectory.org (=?UTF-8?B?Q8O0bWU=?= Chilliet) Le Wed, 2 Dec 2020 17:45:47 +0000, "G. P. B." a =C3=A9crit : > The reason why this has been deferred is because of which semantics should > be used for duplicate string keys. ['a' =3D> 1, ...['a' =3D> 2]] should be the same as ['a' =3D> 1, 'a' =3D> 2= ], I do not see how any other way would be justifiable. This means using array_merge semantic, as ['a' =3D> 1, 'a' =3D> 2] evaluate= s to ['a' =3D> 2].