Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119819 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 66879 invoked from network); 5 Apr 2023 22:35:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Apr 2023 22:35:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9DF2D1804D7 for ; Wed, 5 Apr 2023 15:35: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_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL, STOX_BOUND_090909_B,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS36483 23.83.208.0/21 X-Spam-Virus: No X-Envelope-From: Received: from insect.birch.relay.mailchannels.net (insect.birch.relay.mailchannels.net [23.83.209.93]) (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 ; Wed, 5 Apr 2023 15:35:52 -0700 (PDT) X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id EEC51881A28 for ; Wed, 5 Apr 2023 22:35:50 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id DE9B98821C3 for ; Wed, 5 Apr 2023 22:35:49 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1680734150; a=rsa-sha256; cv=none; b=wbU5MccT14ZaU0Ql182g0Odbgo7xcC2peahNtVd74EF2Lz7HNlTcwL6WDq9R7ZEYrTuJJI tuDROuCvjZKOonQBYpRTYeeQsoJVGrPcTYMUguitaHLXVFAP5gvH6Ps5VJTsjckTZqYFI1 vlioIEIszimXaifxKFnIhbQeK4WYWbbUR8hlAUjm20MKmq3/HxlMTzVrZ9670kiBEslVNr 13t/6nRZq5UvYRAYyDcb4zItSRPQhfA4oextcgIDr49gNiFT0Eh26prSwAQ2yFDMQvJdBW t7/nHsaqp91krDdLqxc0KJ8XIj8oug4yzuxKm2+Z1FpIRtgBL/SOUY7eUXanwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1680734150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BcUiF/NyjiJa3kmYciWFR2ClPlH0zHsqW9zxudSDAr0=; b=AGK/3R0We6zg7yixku8AvV/fSSJpkRrPwpdqItHUty2UFQiHgaFVTyD/kQ6F6GHsN8fXsm +jRHlHxFYMQV99Q1q/zPuJR5jf7Fzw2lKClcUNABp9yYk25KT98gPVTpUolyXYaZ+Zuiz3 612+IMh+XoUNP6vZ4we6TII535IZdnnbkU/z9NzFUTNlw/7Tnrj8t3Vp2vgncxSHG6GQ/u vz3oWDtwrFHvzfD8Nm/B7soUhgkFo7MhbWn+Vv6sIok0LkQ47h16AA1OQSYvMe96bsQiZE 1P/d5VvJSbvE3SUgYann8qXlu4Jp39zd5Z3Yvfj4mPTI9wDPo0jq68HIWPoS9A== ARC-Authentication-Results: i=1; rspamd-786cb55f77-62bdg; auth=pass smtp.auth=a2hosting smtp.mailfrom=php-internals_nospam@adviesenzo.nl X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|juliette@adviesenzo.nl X-MailChannels-Auth-Id: a2hosting X-Industry-Attack: 45c9b4876a3b1b29_1680734150439_1042392903 X-MC-Loop-Signature: 1680734150439:3478331714 X-MC-Ingress-Time: 1680734150439 Received: from nl1-ss105.a2hosting.com (nl1-ss105.a2hosting.com [85.187.142.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.101.8.116 (trex/6.7.2); Wed, 05 Apr 2023 22:35:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=adviesenzo.nl; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BcUiF/NyjiJa3kmYciWFR2ClPlH0zHsqW9zxudSDAr0=; b=hU7kEcMrYhIR5xYDfo59TGBYaH ByUv9t5r161en5XI+vSjJoSRVgId/eP3o3ejUkghOCxlVPaZ+y+0Ggn4T2A4mkA/LcY8kk7980tm4 QkwyrzJvaKiFqNQE3uX+h+CgTrey/mJ3V5jDYtg2pCjnW5w9YXeVbWTwdvIM4U5xit5M=; Received: from [143.178.154.86] (port=54360 helo=[192.168.1.104]) by nl1-ss105.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1pkBjH-00ADCd-30 for internals@lists.php.net; Thu, 06 Apr 2023 00:35:48 +0200 To: internals@lists.php.net References: Message-ID: <642DF7C3.2020703@adviesenzo.nl> Date: Thu, 6 Apr 2023 00:35:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------060106010003020905020807" X-AuthUser: juliette@adviesenzo.nl Subject: Re: [PHP-DEV] Array spread append From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) --------------060106010003020905020807 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 6-4-2023 0:12, Vorisek, Michael wrote: > Hello, > > I would like to open a discussion for https://github.com/php/php-src/issues/10791 . > [https://opengraph.githubassets.com/a23cb565cc8acac6a33ecab5d9ee68a46f046a1ffe215501673156e506695430/php/php-src/issues/10791] > Array spread append · Issue #10791 · php/php-src > Description Currently spread operator can be used for almost anything. But not for array append. I propose the following to be supported: github.com > Appending N elements to an array is quite common language usage pattern and I belive it should be supported natively for shorter syntax, language consistency and performance. > > I am unable to implement it, but I am ready to help with RFC. > > Michael Vorisek I have the feeling I'm missing something, but how would this compare to array join (which is already available and is actually shorter than this) ? $arr += $arr2; Smile, Juliette --------------060106010003020905020807--