Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123248 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id B113A1A009C for ; Wed, 1 May 2024 20:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1714595932; bh=5aE8X06ZA2M4EfovsY9ejhjuTEr/mtuxUgF4RevAQd4=; h=From:Date:Subject:To:References:Cc:In-Reply-To:From; b=OkoomakvNeU82cPYGVZGjA0bkO2b+mwCBBH3wZIfjYcnCvmILq28avaK4q9Rjz9XB 7IM4tl8KRfGyKHX0Fz29cFwqyeZoUfldlTTvgN/CX8hSFC129GrgROtmvVsOQYHXDU E4+Ox80yba3vFJvGvSjUFC8eNWZeDkrW7OE6FoD2aAABUa9+c2mP9GlGx426WhOcNg 7bdvjis9DUqh6tnP/TpuynczcX9U4LhSnZdW75BfwCd9aXBBq3w0zt/TIWWX/RBDRn Ba75+jGZBUfOqbn02IDDdpa3QesYn7xA3i5iDHWALAsw5cFeQ63+XsBJjFQ+EAX33H kzYCOcmM4L+IQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 65CE718007A for ; Wed, 1 May 2024 20:38:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 1 May 2024 20:38:50 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-51bae805c56so8324276e87.0 for ; Wed, 01 May 2024 13:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wcflabs.de; s=google; t=1714595884; x=1715200684; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :from:to:cc:subject:date:message-id:reply-to; bh=YKPrRQsarjOwBT79PWW1Aeu/Kv5xJKgpw+To1akUgoo=; b=PaCUs+Qy3rrttlDLtRkFbABQ8m10kd+NdQ3IX7LIKPoSHlg+izkP4NjTy3z14sPD27 nS2Z9w8+YdeuikHUWcfZVlw0roNhDHSw/pPRoNNsee7FhZap1difNLLitZubvO708/qs 8oO3LwKffsSfWAhKtp3lD8OynEJK51dG7mPi5cltey30NX+cGdg8EHcfx7Syd49+W3ZL kERfZ58ZQYIBiNoEgkVqgOXPHsHS4ibe5FCdjQ/rFwOIjPRl1aXtSO/cIXpXaAqOKgVs wYaLWkrz4JJdAYwVQ81qzOZQpFzJZKm1lJTGn2Kj9Plv5ng62neYbSecKe4rUyS9gqjv OFvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714595884; x=1715200684; h=content-transfer-encoding:in-reply-to:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YKPrRQsarjOwBT79PWW1Aeu/Kv5xJKgpw+To1akUgoo=; b=XxWfwsTRi+0dBY5Uiga3xi8cfZEx8TEUzxZMfblFzoMynLHjLSYc4IPefFNkfRTQSA 08Wh/2Qkm+sJgVP4h8VbNPo2yIKubC5KT7IV8f4qcJA5DDhXewMMT0gkobSk1rHDxC+x ygBRK6ItnNc8E/VdpnDwfD721yGKR7nXI7SJ+rt4y6rqoIH5YlwUXLwiDP8vTAWFz044 kX3FnPBr8mk/h4OGDMODLFgJBrjgZ+U0Jf3hzCum1ZERvaqjT1NFcwmSraxxyowrVnm8 IDwmvLiBjwn5FSwNviLbA50tde7cSblnZB6T3qzuImpiJsIUL04ICwh8xy5+HSKfe6aH JRqQ== X-Gm-Message-State: AOJu0Yx5xpbk1GdJX3PKfU6Q+1MpdJ8InyvxGFwKHUUCdsqtOkXL4Ebw 9OGkuJ1CqPesdVdYHEbUq9T1bDjGEngIK//uSisXGwQOLmf9HymWaYWGZlhxUrM= X-Google-Smtp-Source: AGHT+IH+bmx98fmA+gfl0tfmR99EVVBNJy/xZ5SLaNIbdVCSU1Uwtk8vzGC6/U0Xwv34wxNmewzzhg== X-Received: by 2002:a05:6512:12c7:b0:51f:196:d217 with SMTP id p7-20020a05651212c700b0051f0196d217mr537002lfg.63.1714595884401; Wed, 01 May 2024 13:38:04 -0700 (PDT) Received: from ?IPV6:2a01:598:c000:f1a6:15de:df28:b7b9:4797? ([2a01:598:c000:f1a6:15de:df28:b7b9:4797]) by smtp.gmail.com with ESMTPSA id ek26-20020a056402371a00b0057266474cd2sm497236edb.15.2024.05.01.13.38.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 May 2024 13:38:03 -0700 (PDT) X-Google-Original-From: =?UTF-8?Q?Joshua_R=C3=BCsweg?= Message-ID: <4b86febc-b4ee-4644-bcfd-094fcf79e12e@wcflabs.de> Date: Wed, 1 May 2024 22:38:02 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] RFC [Discussion]: array_find To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= References: <24e4529d-0b75-44de-90ef-34de5dfb1c99@wcflabs.de> <278889be-82ab-4827-a9e7-801b5ba2d8f8@app.fastmail.com> <45b726f4-8085-43e2-b701-6b35bc249409@wcflabs.de> <23f2275a-7a26-4f8a-b5c1-d92ed0298d1a@bastelstu.be> Content-Language: de-DE Cc: PHP internals In-Reply-To: <23f2275a-7a26-4f8a-b5c1-d92ed0298d1a@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: josh@wcflabs.de ("=?UTF-8?Q?Joshua_R=C3=BCsweg?=") Hi On 19.04.24 23:29, Tim Düsterhus wrote:> Thinking about this: I believe that it would make sense to bundle > array_any and array_every (or array_all, see below) within the same RFC > due to the similarity. It can be a separate vote for those two, but > having the option of getting all three would probably alleviate my > concerns of adding new array functions piecemeal. > > The implementation should be trivial, because it effectively just > changes the return type. Nevertheless I'm happy to assist should any > issues arise. > > As for the naming: > > JavaScript: every      + some > Haskell   : all        + any > Rust      : all        + any > C++       : all_of     + any_of + none_of > Java      : allMatch   + anyMatch (in java.util.stream.Stream) > Swift     : allSatisfy + contains(where: …) > > It appears the commonly used choice is all + any. Thanks for your suggestion! I have added the `array_any` and `array_all` functions to the RFC accordingly. Cheers Josh