Re: [PHP-DEV] [RFC] array_search_range() function

[email protected] ("Larry Garfield")
Newsgroups php.internals
Message-ID <[email protected]>
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 دوشنبه ۱۷ اوت ۲۰۲۶، ۲۳:۵۵ سپهر محمودی <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.