Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120504 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68765 invoked from network); 1 Jun 2023 19:48:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jun 2023 19:48:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E4156180384 for ; Thu, 1 Jun 2023 12:48: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.7 required=5.0 tests=BAYES_05,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-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 12:48:33 -0700 (PDT) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2af2b74d258so18129681fa.3 for ; Thu, 01 Jun 2023 12:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685648911; x=1688240911; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YxYkCeNwKtpLu9uwOGPS5gsQS+5F//anQ/PfjGDkl4o=; b=LH8ZAagq33EqJcNDWbbUXW1Oyud3+JhgsPmSwzqPW40jVj0MbJPOQHO+w9KOJwsODg 8/2xssmw4zSH2fSgxLnj2PAitT4E21pB4GRPb0qyKEMiUDK58j2D+FiPy+lyanvzKCOn 0szMibXB05xDYPl8BiQPSSejQXhZlAM4fZDAK+pidWmiHNwq4AuM2v94mYFNz44dXSZD revC3ZfuBRn5I5VA7eKMk45xgMzTKqvpENb0uZW7V9Z9xDoHzwsIYyFtXTQZKFHTfit3 eVW2om4XjnBQgrNo6oHyE1EX+XV1lyQ6zlnX8166szjwwAHBdgpTXN57ts3hTbJVmhsk pf9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685648911; x=1688240911; 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=YxYkCeNwKtpLu9uwOGPS5gsQS+5F//anQ/PfjGDkl4o=; b=ZgLyDi2HU9jVY8usvJmLLYeb9p6p7WHAy7oU6sizNYO7ARMifxVRbUl3g3jJPGJ6Dw +tZDd8h0+zsuYfWAYn+MSgCsBqYLYODnRwyDp7X5f772gMeV0oTd3uVt2EUBTikKs7Vy 74NHQKKXsqSvPLrw33LhUVpFSh2daFjo6QMiKLSdcexwYKU/LasMESOi6yeRFykSEcTw PYp3hW9MykLuOJ+w/Ui3/VZjFsHY8xQG9EDMXk4VecS6NGYkkQwCElRuhN1nioqXI9// LER0zTsGWbgxdC8NniD2vy9GdTbYRakSHiGtSWCeaab/Nenb92ZIi3Z/3K/sPvTq5tBg ZscQ== X-Gm-Message-State: AC+VfDyzImGvjdoDTILArESWXP5JkzVF06WyhMFuebu5p1hmazBlqLED qHeR2lfIOUiMIl+OPC6K/jmZfnVdv+rscgl7umQ= X-Google-Smtp-Source: ACHHUZ6LSJza4OfiervTl8PYd7jbacvOMK2e/+ffyKauTnVUk68A0UMH6s5V+7gNwz3Fdc5Ya9g6Pp+1HfJQHrBNftI= X-Received: by 2002:a2e:9496:0:b0:2b0:520c:4852 with SMTP id c22-20020a2e9496000000b002b0520c4852mr362105ljh.27.1685648911199; Thu, 01 Jun 2023 12:48:31 -0700 (PDT) MIME-Version: 1.0 References: <97308c1d-e9f0-e28d-78ba-11da2a136ee6@fide.pl> <59ab68ce-8634-4ec5-92ae-ea46a04d774f@app.fastmail.com> <5e2e1efa-1dfa-64ea-354b-36fe9cc7b4e5@bastelstu.be> In-Reply-To: <5e2e1efa-1dfa-64ea-354b-36fe9cc7b4e5@bastelstu.be> Date: Thu, 1 Jun 2023 21:48:19 +0200 Message-ID: To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: php internals Content-Type: multipart/alternative; boundary="00000000000091865e05fd16b8e5" Subject: Re: [PHP-DEV] Proposal: addition of array_find() and array_find_key() functions From: jorg.sowa@gmail.com (Jorg Sowa) --00000000000091865e05fd16b8e5 Content-Type: text/plain; charset="UTF-8" Hey, Native implementation of the function array_find would decrease number of lines needed to perform basic loops over the arrays from 4-6 lines to just 1. And I recollect a few times when the argument of reducing lines of code needed to type was a valid reason of implementing the change. Moreover, only this function would allow to achieve the same result as proposed functions any()/all() by Tyson Andre 3 years ago. I still cannot understand the context why the rejection reasons as "Too small in scope/Object to the choice of namespace/Prefer the global namespace" prevented PHP to have something which is a basically standard in other languages. https://wiki.php.net/rfc/any_all_on_iterable Kind regards, Jorg --00000000000091865e05fd16b8e5--