Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119821 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99848 invoked from network); 6 Apr 2023 08:00:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Apr 2023 08:00:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1AC891804B3 for ; Thu, 6 Apr 2023 01:00:44 -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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, 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-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 ; Thu, 6 Apr 2023 01:00:40 -0700 (PDT) Received: by mail-wr1-f50.google.com with SMTP id d17so38577167wrb.11 for ; Thu, 06 Apr 2023 01:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680768039; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jdNMsYtURPPA8aPMFxmk7NWpnjAzWbJ2lTwXUN+SWow=; b=Z5qCO+clVPO/yXmajMEoiZMcwOloRYr6hb1JSkFXwIyMzsvo2gGhi6epZzfcPqK1/n SJOzbqoJ4ngKIcjaqwYXXYGsN8MgY0lwuJVScFOWjcOuLOCP70yOjQN/I6gDyawhhP1W BKLNqtTS/N4+AqLP1UPztUVWUe7aiHb8t6yL39kZlpy9YH5EIjZnkWBenBL7TzDXO8tn v6TfuFCnr6tkwSsYVPFSffyyWbyDbvf3aonugtefw781Xx+b5fnSLQfOA9o1Ns9yKcME LaQmKYIboCsfc1VPXDTQt0dD6Nd5xVvF3TfkcXcvUDGW16C05oV434z34XCN5VME2otr Zb8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680768039; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jdNMsYtURPPA8aPMFxmk7NWpnjAzWbJ2lTwXUN+SWow=; b=K26FSzZNOSDkjtqUYhopt3KqXsnpCs+SlhqDBVyXZWZ6GbQiNZIy24/tOGMaFP9qqt LSXAR93QL8290P1NpreAGIaRO4eJ1BAW4bJC33EhGp936/VbsmX9z7HIRK98GNRu+DoH pgwqJWEa9HW6xTex7BNzhxWXZTeyykyE1iQSFh3iyI4FKQcd8W60rjqF903G2+jV9tXs tIN73zdz9KaM+DDc5fAfvKy6sJR55mLLyrVr62VDO3SXWqYaEZhS+mXzAV3EZFdSJPze U0q21amY+0ONlWl3euwYE1LVUs2uIpG6JVBZxV7OaAM1x/gEJkffmnn5q+rQjrJIorVP OHBQ== X-Gm-Message-State: AAQBX9f3vUD0+JSSoOuVmiyQNEisx1G1l8G+LCgNYBC8zPwC5ncgZAwr c4oabaUkRxPQ58tbZ9+weFmmigPqPHceiclrHx02MOJE X-Google-Smtp-Source: AKy350b9tD7S7+nguiwPtCKGhmr3CEkUaNoU80eCII75HytHXC5EilrxuCv6Vendo+sgHjlGAxWKlwux4VXkI1M1BcY= X-Received: by 2002:adf:e689:0:b0:2ef:9d5:f54e with SMTP id r9-20020adfe689000000b002ef09d5f54emr151922wrm.6.1680768039003; Thu, 06 Apr 2023 01:00:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:d090:0:b0:2cf:ef90:c596 with HTTP; Thu, 6 Apr 2023 01:00:38 -0700 (PDT) In-Reply-To: References: <642DF7C3.2020703@adviesenzo.nl> Date: Thu, 6 Apr 2023 18:00:38 +1000 Message-ID: To: Andreas Hennings Cc: Juliette Reinders Folmer , "internals@lists.php.net" Content-Type: multipart/alternative; boundary="000000000000ea2b5705f8a64d7c" Subject: Re: [PHP-DEV] Array spread append From: mickmackusa@gmail.com (mickmackusa) --000000000000ea2b5705f8a64d7c Content-Type: text/plain; charset="UTF-8" Call me sentimental, but are we just trying to choke out the few remaining reasons to keep array_push() in the language? Okay, yeah, sometimes at is a drag that the first parameter has to be declared in advance and is modified by reference (which means you can't enjoy null coalescing or short ternary syntax directly in the first parameter) but... The whole purpose of array_push() is to append one or more elements to an array. Spreading the second parameter makes this task simple/clean. https://3v4l.org/RcKRD I feel like PHP already has an extensive toolbelt for merging array data. I am not yet sold on this new/strange implementation of the spread operator. Mick Harner mickmackusa --000000000000ea2b5705f8a64d7c--