Re: RFC [Discussion]: array_find
| From: | Levi Morrison | Date: | Tue, 23 Apr 2024 20:22:11 +0000 |
| Subject: | Re: RFC [Discussion]: array_find | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123194@lists.php.net to get a copy of this message | ||
On Tue, Apr 23, 2024 at 1:53 PM Joshua Rüsweg <josh@wcflabs.de> wrote:
>
> Hi
>
> On 19.04.24 21:20, Joshua Rüsweg wrote:
> > I definitely see the point where there is an advantage to having two
> > separate methods and can definitely understand that it is easier for
> > developers to understand the control flow without evaluating the
> > parameters.
> >
> > I'm unsure if that's really necessary though, because basically it's
> > probably not necessary to directly see what exactly the function
> > returns. Perhaps there will be another opinion on this in an email in
> > the next few days.
>
> Now that I've thought about it for a few days, it's really better that
> the whole thing is broken down into two methods. I have adjusted the RFC
> accordingly. The RFC contains now two separat functions
>
array_find and
> array_find_key.
>
> Cheers
>
> Josh
The RFC looks better to me. The
[Unaffected PHP Functionality][1] section looks like it needs
updating, though:
> This RFC only adds two new functions and an enum to PHP and
> only affects previously defined functions which are named as
> the proposed function or enum.
I don't see an enum in the text nor in the git diff.
[1]: https://wiki.php.net/rfc/array_find#unaffected_php_functionality