Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120499 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 35466 invoked from network); 1 Jun 2023 09:56:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jun 2023 09:56:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0FC481804DF for ; Thu, 1 Jun 2023 02:56:33 -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_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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, 1 Jun 2023 02:56:32 -0700 (PDT) Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-973f8dbcc02so86307366b.3 for ; Thu, 01 Jun 2023 02:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685613391; x=1688205391; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AQcx0Zglo2M/p/eBkVsSO3FbibBPqyVvwTFhWrBR0ho=; b=MRat5DZT8r/rqe4PFnz7QfQlHxzL/r4a1sRyP9CseZSZClcXetVFIU3dMrgBRnhBEM z64MCEiCjqp4Tb/fVeHh1mo997FRTpqSaTt/EQiBOCvK9to4+k0qkZqi2lnOOceV5zCS vq3shvbIGF3atTLq6BeCvpZpZbncfj13vljxvX4H+Xcfo2Eaup6ZIA/Pra7kWcO2lUnM dSQsYkRNYSu30Z/gtvnqB0K7jzim4v51xR5TxPMkOM0KM1PV1WErCTtqkaGr8r6Ytd2y yB5UEsiDfRIKl4OyDB/qrJ4C3IfhfK7OmRtpdo4v9EA+Q/tMdMWXIglzXzJDBs/dw11J PDjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685613391; x=1688205391; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AQcx0Zglo2M/p/eBkVsSO3FbibBPqyVvwTFhWrBR0ho=; b=knY7dYLQLYjf+kaqxuxrj8E5ArDqrTBJ5VF+Ix2aEr6w3o3qgAXhdCV8Cg7AMPwXqW Uspey67Vvjl7ZjFakPW1hJp5rtHK/9N1WqWD9U6a3GzgAhEaQep4BS3GKsK/RS7vitLO K+J4iOXhOMjo8LJCU7MtOXdYf+F6D2aNIW4Mr470U5z1DLk0gE3SbyMCxDpoxQ6jiAUi xEjt7Sj8wFU25gtLKiZ4CuSxRmkPUhiM6nMZ58a/dtXQIb7J+SO7U5VpjKmfhDXAc3VQ vNrTgnoS+dWDKNg+ty5xQ41u3q0m3jt9m3s6lTvyqPOGxojNkJeAyDMJq/wmIUSI458/ w3KA== X-Gm-Message-State: AC+VfDyPii02i7KFBmrkaVfIbTR1f2QSSuMUXR8M2ZrmAcqPFwbpjjjz S07HrnNvPBmFNHNOxjgDkASLDLXjieA= X-Google-Smtp-Source: ACHHUZ46lEJusybc6bWKoej/8XJrdXn2APc+s5Y4wNLw43IzMeUVSkApjZEaL/JNIZ0qjIr/x0Lz/Q== X-Received: by 2002:a17:907:2d93:b0:96f:d07e:a1ce with SMTP id gt19-20020a1709072d9300b0096fd07ea1cemr8039258ejc.60.1685613391043; Thu, 01 Jun 2023 02:56:31 -0700 (PDT) Received: from smtpclient.apple ([46.217.49.136]) by smtp.gmail.com with ESMTPSA id f13-20020a170906560d00b009603d34cfecsm10287218ejq.164.2023.06.01.02.56.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2023 02:56:30 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) In-Reply-To: Date: Thu, 1 Jun 2023 11:56:19 +0200 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <40AD8627-C7EC-4FD9-B47E-8F3A8B8737BE@gmail.com> References: <289E585B-EF8B-4B17-89BE-BE8295FD9FE1@gmail.com> <5FE9216F-A84D-4482-A22E-05A44C2A9A3C@gmail.com> To: Casper Langemeijer X-Mailer: Apple Mail (2.3731.600.7) Subject: Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group` From: buritomath@gmail.com (Boro Sitnikovski) > On 1.6.2023, at 09:18, Casper Langemeijer wrote: >=20 > On Thu, Jun 1, 2023, at 01:19, Boro Sitnikovski wrote: >> Thank you for the information and encouragement! I was a bit scared = of this one being rejected too, but still decided to give it a shot :) >=20 > As an alternative approach this is what I would do in your situation:=20= >=20 > I would start with a PHP implementation, gather some opinions on what = this method would do, how it should work. Finalising the functional = specification to a point where you find broad acceptance. This would = also allow others to help performance optimise your implementation. >=20 > Then start a PECL extension implementing the exact same thing in C = code. This could start as a niche for people that really need the extra = performance the extension would bring, possibly grow out to something = that is defacto standaard. >=20 > PECL extensions are documented in the PHP manual, so the manual could = have your array_group() function described, possibly with a reference to = the original PHP implementation/ polyfill. >=20 > This approach minimises dependence on internals giving a green light = and maximises the possibility to work with others as a team on this. It = would give you a chance to prove that the solution you provide is = actually wanted by users. If that really is the case, if it came to vote = to merging the extension into PHP itself the vote could be different = than the vote on the former RFC. >=20 > Greetings, Casper Thank you for the suggestion, I like this approach and it's definitely = much "safer" than going with an RFC for core directly. What are your thoughts on creating a PECL extension called `array_utils` = (selling point would be high performance array utils or something), = which in the future might contain more than `array_group*`, and the = approach would be to cherry-pick those functions that have frequent = usage in codebases into core? Or would it be better to stick to a = particular/more concrete extension?=