Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123428 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 25B151A009C for ; Sat, 25 May 2024 08:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1716627517; bh=nJLVK2RqWUX1R0OWLv2Ux4qgT1+kvKRxgVzoeO8y69M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=TM+71G3U+nagI5DbYRKWj9wZk4DWeoeijlgXhR9LE3joIPYQqCltY6rPjco7lFOOO sa/uwOvbL5Bg3YD2mPLVPvpKKwI6c7iSq+Q/SmHexUFpld4BwTzqslEXyj8OFIY9hx N8LjvB4+r3E5lxHmqTqtLBu8jL3r84EeXgJVEEZj0G8hF5VI3gleXcmtXWykjzaKtC H38qSsexLKdVrXH+HdYrZLJ8bKz+DSNC0569/YEZgLCzDBifXglshw9qyXOesOh4MX wJxKO0mwgYBnDYRL9007vLBbwME5zYy08Zc8gvI/BP4GbhYU1DlGOz08xDgyXbKgyv HlWxt1JHyruYg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0EC6018003C for ; Sat, 25 May 2024 08:58:35 +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: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) 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 ; Sat, 25 May 2024 08:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1716627454; bh=dOzRv2K+mkqn2sVcprwrMKxtu5QCliZQxY6ppRz0n2I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=Ze6VY+Xm4cdh9KG/AAN0+TVoxPkZQZHgdgUh4DEIMX9QeR9/fzUHfBe9HTnC9FwYe SRLpNJ6CWRvUeAesx2XuJS8qhkMhz07Y6tAqVvU33uY1A58fodmeEm8NRuwgZzZoC8 H4Tc/HOwKkEv3HaIr1nTg2xX2M9bbgNytuwB5+R38LW1nVPjN9woNuPonrss/c0fSu vUiYrTKmGgmZZCBwsDxKgfboBl10bqbEGxiEl+GduO6CxXqWeKOM+JhOW/QSohl6S9 NqjSvNq5IF7BTOPUdiKerrW1A+9Ez6ujxE5rtjAyFVYWMsYOiBGLTbiwfmCYwwoxxj KWxzv72Kez0BA== Message-ID: Date: Sat, 25 May 2024 10:57:34 +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: Valentin Udaltsov , =?UTF-8?Q?Joshua_R=C3=BCsweg?= Cc: PHP internals References: <24e4529d-0b75-44de-90ef-34de5dfb1c99@wcflabs.de> Content-Language: en-US In-Reply-To: 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 5/25/24 01:19, Valentin Udaltsov wrote: > Have you considered renaming `$callback` parameter to `$predicate`? I > always considered "callback" to be a very generic word. Predicate, on the > contrary, implies accepting a value and returning a bool. > For an entirely new API I would agree. But for the array_* functions we already have $callback for array_filter (and also array_map and array_reduce, but those are not predicate callbacks). Also given the vote started with the $callback name and the fact that parameter names are part of the API (due to named parameters), it's probably to late to change it. Best regards Tim Düsterhus