Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123163 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 4E2471A009C for ; Fri, 19 Apr 2024 21:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1713561507; bh=GW0obzvgCcWyHa5TsESKYsQJ97OM2P1gtsExFM3dWEc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=nsMQufikEaagj7jKohDM+Z0eYP1RAcX8mf0uiYGjMY1K/NZZdIVM2igycvqlAWN2+ lRiR36LLQ1POWyllD84tLk7klYTBhNLl0H/v1t+MkN1dbmk2bZfoiJZG7XbwvSeX/u DdIRxKYIKiQLA2sZYGEaC8zNoerKx37gQ/CRy0HH0cZkiN5vUpPRJmdYYGLj/AspLb 0ZjN3/d90laAv0UlrNZZJohc5D5X7Zz/A1JNgObPcogkIkDlTTOFqkCKQ8pMJ9zfkN 1H9az3jpc2z/k9spydjPAfi0Zs2Tc3VJJ101bQmqvnko8WTx8epZwGdRcQCrGveX3n 2j3CpLfY+x1JA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DE3B318006C for ; Fri, 19 Apr 2024 21:18:25 +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,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 chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 19 Apr 2024 21:18:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1713561465; bh=+hgZaGalXtA+z4GG018DiNIsBUcWrctDcdGPRDHi4Hw=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=KWI9eDsgqUKStBF0JehrSmvJFBD0TfAcfaHl46vVzqY4IPRrt2r9KLW+KEBA+hOcE uUmsvtnl/JHQ+tV3nzsPVMOG/5mwqliSLLnmwCUtu+t8t6Melep8HgBCyZsRUrs+6o yB2FskJLcscFIsbhiJUnt4jueNi4frU0x/VssNbMxlN6TWVLXK15wm+bar16bcuTvE gBNuLplWzPi9nDK3KkFtxrOow5kleU0ocDG2p391gijnaldiCrFsJaTvdCm/4yPJFM CqoesdXOHIE7bD8z4KPloEGACWS0QWxbK1L9DpclMJwDruPoouBDj9kZ9xxArJZFWg /1AcfIL861uOg== Message-ID: <886bea6f-20a3-4f20-b773-7204a83a42dd@bastelstu.be> Date: Fri, 19 Apr 2024 23:17:44 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] RFC [Discussion]: array_find To: Larry Garfield , php internals References: <24e4529d-0b75-44de-90ef-34de5dfb1c99@wcflabs.de> <278889be-82ab-4827-a9e7-801b5ba2d8f8@app.fastmail.com> <45b726f4-8085-43e2-b701-6b35bc249409@wcflabs.de> <2dd7ef64-d1c5-4ed8-964f-b86dba110e0d@app.fastmail.com> <4bdc94d9-f35b-423a-b3a7-1a91fbf48424@app.fastmail.com> Content-Language: en-US In-Reply-To: <4bdc94d9-f35b-423a-b3a7-1a91fbf48424@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 4/19/24 22:08, Larry Garfield wrote: > There's another issue, though: Will the callback always be given both $value and $key? The current implementation always passes both, which, as I just learned, is inconsistent with `array_filter` which has the `$mode` parameter to control what to pass to the callback. Not that I claim that the `$mode` parameter is a good idea from the typing perspective for static analysis tools, it probably isn't. Best regards Tim Düsterhus