Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130129 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 lists.php.net (Postfix) with ESMTPS id 4CD8E1A00BC for ; Sun, 22 Feb 2026 18:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1771784730; bh=He0+T4YSzrURmd93mmX3zUr0Lk33cVQo78Bmjinno/w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VAM72DKQys7JZ8Cj2cYEuha9xul0pC0fdrD7df/hwQYecwJS5XReyt4agCTf+Tl9a b1a7cgbNrQAZIwn87DJXW95JY5nlXixJcoe5/gu1KI7DV8HNpJX0Rf4Dv7g0Pk+4qg pGvK9UzIcSRYxYdY21+n85/hbwf2dR8Vu+z0EfZ5XNKfSAvG2BdvYN2WxfIiMhU8s3 3Q3tf4annTEUzFTnL6GFVzWPKzQBvvg8IeCPEiJ5fDUMCFzm6k24touGEFoeroXetg 8UqSQEkBG2Phrd3wRa3kwUtR58+aqUSMbYgljLPSu3t5Yk3+zQcrnSTMi/f2yPYsXa Z43Co1+HRG9nA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2B8851801EA for ; Sun, 22 Feb 2026 18:25:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) 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 autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Sun, 22 Feb 2026 18:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1771784723; bh=pbbx2BR+Cib/weyFvNnTcNW5mwhChxo1biCIDL33gdI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=hqnkFUiFPVrOlgiiQ7Jzw69C/+tTLbTJ8gP3H4VyP+LpuGzlUkuE4scLy8zeK8wNh VopoygZEeSMfx6p3jMLSBqnWcwhPnB/b/HgRYjykX3pqI4d8xH33VdzG8dLq1+/nYO qpexRIRRlW/ltXFid+e3vTdP0vBDCZhWJziSprLefrzBTfliZ8y78LjKn3GiaB8/Op zoRly+bvOJZdXf6Oj352yw/vHwIckz/7WmGJfoqYri4wbMggQm19VZjCccgBXJykiL JnZAk7KIVruRnKm3Vhrdprawm3FeWZ7aW1jeIBhNneBrPxefOnl5PFbZ3tHOVOCnYb 7rds7cWcZYaIQ== Message-ID: Date: Sun, 22 Feb 2026 19:25:21 +0100 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Subject: [PHP-DEV] =?UTF-8?B?UmU6IFtQSFAtREVWXSBbUkZDXSBhcnJheV9vbmx5KCkgYW5kIGFycmF5?= =?UTF-8?Q?=5Fexcept=28=29_=E2=80=93_Utility_functions_for_array_key_filteri?= =?UTF-8?Q?ng?= To: Muhammed Arshid KV , Claude Pache Cc: internals@lists.php.net References: <3ACF2D3E-0376-4033-8CAA-84FAD83E2A69@gmail.com> 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 The same comments as with your other RFC apply here. On 2/20/26 18:37, Muhammed Arshid KV wrote: > 1. Yes, *array_intersect_key() *and *array_diff_key() *can be used today, > but the RFC proposes dedicated functions for better readability, less > boilerplate, and potentially better performance and lower memory usage by > avoiding temporary arrays. Can you elaborate on what you mean by “lower memory usage by avoiding temporary arrays”? > 2. Good point about naming. Making the key-filtering behavior explicit > (e.g., *array_only_keys* and *array_except_keys*) improves clarity and > avoids confusion. I don't think that `array_(only|except)_keys()` is particularly clear. From the naming I would expect it to return the array keys / values (i.e. do the same as `array_keys()` and `array_values()` respectively). Best regards Tim Düsterhus