Re: [RFC] array_search_range() function
| From: | Larry Garfield | Date: | Mon, 17 Aug 2026 21:57:17 +0000 |
| Subject: | Re: [RFC] array_search_range() function | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-132241@lists.php.net to get a copy of this message | ||
On Mon, Aug 17, 2026, at 3:39 PM, سپهر محمودی wrote:
> Hi Larry,
>
> Apologies — my previous message was addressed to Rowan by mistake,
>
> but it was meant as a reply to the thread, and I was also responding
>
> to your point. Both of your feedback is very helpful.
>
> Thanks again for taking the time to share your thoughts.
>
> Regards,
>
> Sepehr
First, please do not top post.
> On دوشنبه ۱۷ اوت ۲۰۲۶، ۲۳:۵۵ سپهر محمودی
> <sepehrphpr@gmail.com> wrote:
>> I’d be genuinely interested in your opinion on the best path forward:
>> 1. Should we proceed with array_search_range() as a focused addition
>> now, and explore “lazy array slice” as a separate, broader RFC?
>> 2. Or do you think it would be better to fold this idea into the
>> larger concept from the start?
>>
>> Either way, I’m happy to collaborate and learn from the discussion.
>>
>> Regards,
>>
>> Sepehr
I would favor shelving this idea for now, and instead putting effort into the more robust solution
that would benefit everything at once.
If you have a specific use case yourself where this would actually make a big performance difference
(which I do not believe is the typical case), then a custom extension with a single function seems
like it would be pretty easy, especially if you've already built it as a patch.
--Larry Garfield