Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116575 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61187 invoked from network); 6 Dec 2021 09:24:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Dec 2021 09:24:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B0C9A180546 for ; Mon, 6 Dec 2021 02:24:02 -0800 (PST) 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 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-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 6 Dec 2021 02:24:02 -0800 (PST) Received: by mail-ed1-f45.google.com with SMTP id t5so40748738edd.0 for ; Mon, 06 Dec 2021 02:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=qD4SojuX6CZB/8Z1cic7B//FarRp/U1HqGgc9U26SEs=; b=SVqFzJe/VTzvOVR49estsQ+Zqhb+DDtwLGdmZCd34kbjvdwiiuaFbVu3xt9AbI8k7U 4pkJkR6zSGxK+nv4lfakHSxoeQZGtA/UDNuyzBdn8Wwasxw/PQmolBxvXjyMcgu8+OKa VRbJ4qLdPAWeVtbw8jznucRPUEV6sbvP2LawwQoerbMdtTEi42Z8NWcnkXKCyUe8OLMG XU7YvsjQ6EP13ahpWAqky1NJx0xUWaZsdZgjwwBxT0oYIQb2hjGOnRhFJthP+scGHzwd 349rUQFlig88Iam9EKS8AtiSEp2jsk52/QlI0jo3Zx7v+ej5DBN9IHF610HIt7DFvza4 rECg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=qD4SojuX6CZB/8Z1cic7B//FarRp/U1HqGgc9U26SEs=; b=jsWFK9mGBXqQel2MdUKP2UlgrkDVKFHvOL0524pwW6GrErTky+NeRFAwjBxXFtq4Ps NjhWCW18zBAD/tFHcnlHW8JPUyitmz4cDdSQK5xGxOK9uP9G3yN9bi7o8Gx1Nfl/aTIt vho6lJASiup3e1gXmB7V2XSh7u7ib5pyj6LOnSO4HoVmtCi9vlYK/ofwvvpLwjJ030+S DAxqK/ZMNfdogkdRTDOMkXrp5V7xnnE4TR3E3JwD4PG3xmCH2nexWQ/0FrarC2Z60LFY NxwKRZuZohTZ+/1GJqRlr4P+QHrfQDfRwisLWdbSyQlb+zSQL+ZDq3YCoNgpDcO0Imkn Cq4A== X-Gm-Message-State: AOAM531GCrWwAL/e7cZIvZIZq9z8ig3vQ8VGH3xPLOv3sYL0FcFwZ8a+ aAUpTYInlzysa38n6FMAkvE= X-Google-Smtp-Source: ABdhPJzQeLV1i7g5Ip921XibJ5SDq/UpaMrCrYgEGCgFo0SNiHohmrrVxlYGqr3hMDIIVBCpTn3oYg== X-Received: by 2002:a17:906:c112:: with SMTP id do18mr45004356ejc.103.1638786241051; Mon, 06 Dec 2021 02:24:01 -0800 (PST) Received: from smtpclient.apple ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id hs20sm6335938ejc.26.2021.12.06.02.24.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Dec 2021 02:24:00 -0800 (PST) Message-ID: <268F5B4F-4770-48AA-B212-DE23116BCF4C@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_1B71CACE-06D9-488F-AE26-2A8261A73E0E" Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Date: Mon, 6 Dec 2021 11:23:59 +0100 In-Reply-To: Cc: Rowan Tommins , internals@lists.php.net To: Hassan Ahmed <7snovic@gmail.com> References: <61ac9759.1c69fb81.b0241.1e6fSMTPIN_ADDED_MISSING@mx.google.com> X-Mailer: Apple Mail (2.3693.20.0.1.32) Subject: Re: [PHP-DEV] RFC [Discussion] array_column results grouping From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_1B71CACE-06D9-488F-AE26-2A8261A73E0E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 6 d=C3=A9c. 2021 =C3=A0 09:44, Hassan Ahmed <7snovic@gmail.com> a = =C3=A9crit : >=20 > Hello Folks, Thanks a lot for your feedback, as already mentioned in > the RFC and as mentioned by Rowan too a new function is an option. I > think that mostly we will go with the new function option. > I will try to edit the PR to add a new function, does there any > suggestions/naming conventions for the new function? a colleague > suggested being `array_group_by` and Hendra already suggested to be > `array_column_group` which is good too. >=20 > Regards, > Hassan >=20 Now that we have named arguments, the issue of long and complicated list = of arguments is considerably weaken, since you can write: array_column($foo, column_key: 'name', grouping: true); in lieu of: array_column($foo, null, 'name', true) Also, an alternative to a new function, is reusing the same function = with an alternative signature, as it was done for setcookie: https://www.php.net/manual/fr/function.setcookie.php = I have no opinion about which of the three approaches (new parameter, = same function with alternative signature, new function) is better; I = just mention the various alternatives. =E2=80=94Claude= --Apple-Mail=_1B71CACE-06D9-488F-AE26-2A8261A73E0E--