Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119822 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 1660 invoked from network); 6 Apr 2023 08:10:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Apr 2023 08:10:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EB71D1804DF for ; Thu, 6 Apr 2023 01:10:20 -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.1 required=5.0 tests=BAYES_00,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-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (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:10:20 -0700 (PDT) Received: by mail-yb1-f172.google.com with SMTP id k17so45288067ybm.11 for ; Thu, 06 Apr 2023 01:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680768620; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vT4TEngjZhUcnLOyUPhrr2mt6n/0bzhPaXIqS4Ha/+E=; b=XENT+c8xw8gJ+wjPi6UlcHEt1It2JDe83Fmy5iwycyRBOx8LD1okE0a2moiJ4pj/G0 Mu/R8TTxxUrSvIJbU8VinDRyCFCBal2bV+s8+EmP5B0Y+axl67g3cSCBExrv8YVnbleJ AnWWrhNlV38nKIPwL7FogBuVpkVqbunEBeu06LjhBUf7QJx8wxFgbSEH2krT3yWZxBI6 /nPX3lpHhArVCVBdUK9ntusZWgK4k3d4n97TgXq2vekedvOJW80vNEF3A+9Y/pXnOD8L XIVNn0rmsaOCnj+Ob20kK4TE4LZbN5y6Rhgrp6LtkhEZ90j1bmw2stj63Xy9hsuXXbpD GncA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680768620; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vT4TEngjZhUcnLOyUPhrr2mt6n/0bzhPaXIqS4Ha/+E=; b=bwiWH39RLTOS+xHbxnX1t7ebpWPoRD85RKHVe83E6oR5574bZh+NEKNKukoVPx/Iij ikmq9JM5xdCprPnKhTiBzRxvz4ickRWxnhyFLpJ/w4dhg5ja/GJq2RENMNbhDgD327wr KVCaSmbLOvkcjxcYG+vxDnYA9I9/tYNteZZk2Kg4VcTkjxDi3p73wfrT6kNH/dwnSjP6 z5dcrpORCWGsb4JRbvAjscefRIVO/9I3a5pH6Tyb9k6DJ9yvtFGS/Kc5LijV+jsj4xQY 1LbWEmuDdBWycncbDmsjJY+wQ6Tc/wH1VOP7uANQAC6F+tMP1M2o9iFZF0gavQKRh/rT Xo6g== X-Gm-Message-State: AAQBX9f7I18W+A3I6yIC9ThV20kHWLFewIKbAO+sMxXDb8AGrwvuVDzE vfG45Lzb4AzeuzshrtJ2o/MNHy+6MUKiQ0WW5AM= X-Google-Smtp-Source: AKy350bCaTUvDfJYYBJ/X8n6NTekqesMxEioKdJtQ3EKKZkT+tqVhVJ3FRsf/Mn0+wYfEjoOevV8FKgAeWzwue1WrG8= X-Received: by 2002:a25:da4f:0:b0:b8b:f8b1:1c80 with SMTP id n76-20020a25da4f000000b00b8bf8b11c80mr683091ybf.7.1680768619644; Thu, 06 Apr 2023 01:10:19 -0700 (PDT) MIME-Version: 1.0 References: <642DF7C3.2020703@adviesenzo.nl> In-Reply-To: Date: Thu, 6 Apr 2023 10:10:08 +0200 Message-ID: To: mickmackusa Cc: Andreas Hennings , Juliette Reinders Folmer , "internals@lists.php.net" Content-Type: multipart/alternative; boundary="000000000000860c8605f8a670a1" Subject: Re: [PHP-DEV] Array spread append From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --000000000000860c8605f8a670a1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Mick czw., 6 kwi 2023 o 10:00 mickmackusa napisa=C5=82(a= ): > Call me sentimental, but are we just trying to choke out the few remainin= g > 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 If a parameter of array_push is a dictionary it fails with: Fatal error: Uncaught ArgumentCountError: array_push() does not accept unknown named parameters See https://3v4l.org/BHPSt Best regards, Micha=C5=82 Marcin Brzuchalski --000000000000860c8605f8a670a1--