Re: [RFC] array_only() and array _except() – Utility functions for array key filteri ng
| From: | Ben Ramsey | Date: | Sat, 07 Mar 2026 22:54:06 +0000 |
| Subject: | Re: [RFC] array_only() and array _except() – Utility functions for array key filteri ng | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-130268@lists.php.net to get a copy of this message | ||
On 3/4/26 23:23, Muhammed Arshid KV wrote:
Attachment: [application/pgp-signature] OpenPGP digital signature OpenPGP_signature.asc
Hi, I think the RFC *“array_only_except”* is ready to move to the voting phase. If there are no further objections or required changes, I would like to proceed with starting the vote. Thanks.Unless I've missed something, I don't think the RFC has addressed any of the feedback from the discussion on this list. Claude Pache suggested:
It may be interesting to compare with currently available solutions.And Mick suggested something similar:
the RFC doesn't even acknowledge the fact that PHP already has native functions which serve the exact same purposeOn the list you acknowledged
array_intersect_key() and
array_diff_key(), saying:
the RFC proposes dedicated functions for better readability, less boilerplate, and potentially better performance and lower memory usage.I would have expected all of this to be added to the RFC to provide further rationale for why these new functions are needed, along with some numbers to back up the better performance and lower memory usage claims. In another reply to the list, you seemed to indicate that you were going to change the names of the functions in the RFC:
Good point about naming. Making the key-filtering behavior explicit (e.g., array_only_keys and array_except_keys) improves clarity and avoids confusion.Did you decide against changing the names in the RFC? I don't see any updates to that effect. I'd like to see the feedback addressed within the RFC before opening it for a vote. It think it would make the RFC stronger. Cheers, Ben
Attachment: [application/pgp-signature] OpenPGP digital signature OpenPGP_signature.asc