Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103453 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49902 invoked from network); 19 Nov 2018 12:38:16 -0000 Received: from unknown (HELO mail-qk1-f176.google.com) (209.85.222.176) by pb1.pair.com with SMTP; 19 Nov 2018 12:38:16 -0000 Received: by mail-qk1-f176.google.com with SMTP id d19so47332749qkg.5 for ; Mon, 19 Nov 2018 00:59:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xmMPKgBBrQTirwnjjTzbJiWbkizzZD1AfmaGcDGohzA=; b=UxYjEeQKHeG8FQF+3cJBnkiVFjjPvGAWDuLSzQuq7yh6YiMhxbQ4soHN/gibRW9wGm 9ygOL0eRGKvNCjlrIz4DLLElVkCcR7sCEr6pTIf6GDxoTq4deMqtKEmcTq0kVwcKsJwv eJb8q4wZCy8SdD/n4XGrSA4za5ExzUf8tV3ZucnkxNXSoXZDUkZ1aGmnI+HXByfsqL8N 44/qkn10O9Kra12o+7iAD/vMYf4bD5t5mmHM5UoQXqyEBIiMF1bSa2Ki06wnYHIY0c2D v8uxAwxoTC59AP13oy6XQOX5qhnWRFmacapnST76n6iYa1hHMsTwgIXUPwwFAMg4ZvY/ 8PRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xmMPKgBBrQTirwnjjTzbJiWbkizzZD1AfmaGcDGohzA=; b=BMh+zTUN62mSchUpG1pQ9cwN+XVCsMZXahIj4rRQh0NFJIFVOmqsBgts+KOnXs8ybL rcMyozHuyBzdR57GnJ5EPO2pYndZ68ZagwKXugATEOZVQQEAJPctv/bIBz4RDDxwE2dE M2PA+9aOB3KECjDjbSogff1vcWgi71EPOhhwHZkzU4or0kpqT28hOdAVlK4gNINr5Kvd CEcjawwCwQ7r0OpjW21Rnvdt+v7loKKKdbIFhZ9e8hCizHFWDfq9dPssoGcy3EU02oec GJpIP82iwBm8TeiMtKv542bttKzSRpLvNDHLaP7HGv4drmHakWsA2iiA73dGLNQGXkla OirA== X-Gm-Message-State: AGRZ1gLVCiXTvZlrWWe9pKdwDcaoRJAogGh9jHJRTEiZZb19PLX9LiET a9raPKHLoPvJn+MdKPcLhe1ZrgGI2bK8m5b/0+t0Fxb3 X-Google-Smtp-Source: AJdET5f4WYqGD24Mxzta4o3mqf6EkLd5W8gf7bjCHjv3fHp8mMm3GOitq6S7h9SqjRLcdwf/Tg1ics1cD+N++A8mbW4= X-Received: by 2002:a0c:8322:: with SMTP id j31mr20663858qva.56.1542617991629; Mon, 19 Nov 2018 00:59:51 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 19 Nov 2018 10:00:27 +0100 Message-ID: To: me@jhdxr.com Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000006a50a7057b00bd38" Subject: Re: [PHP-DEV] [RFC] Spread Operator in Array Expression From: netmo.php@gmail.com (Wes) --0000000000006a50a7057b00bd38 Content-Type: text/plain; charset="UTF-8" Hi, I worked together with Chris Wright, author of the other RFC covering the same thing. You will find there is very little agreement on how this should work, which is the reason the RFC stalled... not because we didn't try. The most important thing is that we don't want it work like array_merge(); in other words, it must not cover both lists and maps at the same time. What you are proposing overlaps the $arr1 + $arr2 operator functionality. Everything boils down to this: ["a" => 1, "b" => 2, ...["a" => 3]] is this equal to ["b" => 2, "a" => 3] imo reasonable... "ordered map concat". ie not only it overwrites the value, but it also re-positions the key or is it equal to ["a" => 3, "b" => 2] overlaps the functionality of the + operator (bad idea imo) or is it equal to ["a" => 1, "b" => 2, 0 => 3] ie discards the key, works like array_push() ? --0000000000006a50a7057b00bd38--