Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119831 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 8883 invoked from network); 7 Apr 2023 18:07:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Apr 2023 18:07:32 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D44F1180084 for ; Fri, 7 Apr 2023 11:07:31 -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=1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 7 Apr 2023 11:07:31 -0700 (PDT) Received: by mail-qt1-f179.google.com with SMTP id h3so14494478qtu.1 for ; Fri, 07 Apr 2023 11:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=majdak-net.20210112.gappssmtp.com; s=20210112; t=1680890850; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BId/LWFxY1UuQn9DJRNO3dkTC8+hwioP9TsliKvme7o=; b=4671g7Ud92l38AhwWmquCbemdUNrxdaMJ/rTVDclq21vArmuKOPdQZrL7QDw64owe+ mPiLH5XnNBF0O+eMjYZlOavEHFhLWJe9pBWLvEGnF53saQFmO+neRNBd4vEqztf+ff2+ m0xyq//bXrWdETX6yL3Mo1SvDC6YBufDhxDSksBIvZQVrkPEBKT9tYTLAtcfDFNyU+0L S11WNYjf5nf4XfmibpUllS122ZzAVRlLMu9bn209TNGiH+M5VNrKJNPrDabIguKXK+50 mMnXQvoFgKuHE9KyOv3EvOuHZ29VmyFy0Dnw05H0XJkGpNPEBC96WfSNvbEM6/YMI3MD exTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680890850; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BId/LWFxY1UuQn9DJRNO3dkTC8+hwioP9TsliKvme7o=; b=Wevjr0Zduw+Zzae+ZmqFR0bTTv4XzimcE8FkeJ6fVVb5seOzFVHlxxSbl/kro557XA NOaZf0AJO/eTa8m2RE+2ycz3BTdASeyVcqZSKGo22ML+WxvssO+0jBTy3HHUc2TePvn9 In2uoj2fo/mqrLF+Gx8SMgfVi7/n6smCXvR7Hlue/zaAdzCxbttLJzso2Q5JDDQTXB8q sCmdLmeHZqhNzIuxSUT/8quA80k393Er37MR8aEr1v4s1C0VK0ZAVtQOKjGG47CFsGgI 5cdTZ+pV3Zq9StCAgnaYOMNsfKY8H2FHEOsT+da3x6Sh8EjXYo/KKMGDJ07UNcTh7RMs tHpQ== X-Gm-Message-State: AAQBX9cocQgj+DcV881dj7HXLe8/Lfjt/8s1O9fdIXw9r8eG1Kv5U64X 1vLEwKJA4naLV+AfzUVPoYSHIp/fD75MXbBBOsiojERIuPYHwPaAb8sfFQ== X-Google-Smtp-Source: AKy350YA2opjcbgI1FQC5T8NNN3kTCA2JQJcI6HdFKArz9iwoawlHcv54GPhJVwj+ZK5o+ekRFWkKvIUIHrCbXx/NxI= X-Received: by 2002:ac8:578c:0:b0:3d3:f7cf:1d4b with SMTP id v12-20020ac8578c000000b003d3f7cf1d4bmr762651qta.2.1680890850469; Fri, 07 Apr 2023 11:07:30 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 7 Apr 2023 13:07:19 -0500 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000000ca6bb05f8c2e657" Subject: Re: [PHP-DEV] Array spread append From: bob@majdak.net (Bob Magic) --0000000000000ca6bb05f8c2e657 Content-Type: text/plain; charset="UTF-8" > I think it would be more intuitive to implement an array "appending" > functionality with "concatenating" syntax. The `.=` syntax already exists, > but is forbidden from use on non-strings. If you want to implement this > preexisting syntax as an array concatenation operator, then it is a blank > slate -- you can decree whatever behaviors you wish for it without blurring > what the combined operator does with strings. on github there is a comment about adding an array_concat() instead like js's Array.concat() that would try to avoid the pitfalls of +=, array_push, and current behaviour of .= flipping through the mdn for it, its results seem alright. --0000000000000ca6bb05f8c2e657--