Re: Two new functions array_first() and array_last()
| From: | Saki Takamachi | Date: | Sun, 15 Oct 2023 03:48:57 +0000 |
| Subject: | Re: Two new functions array_first() and array_last() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121320@lists.php.net to get a copy of this message | ||
I came up with the idea of using a signature like array_filter(), and when a callback is
passed, "return the first/last element that matches the condition" and "return null
if there is no match."
The downside to this idea is the loss of simplicity. So I'll leave it up to you whether you
want to go with this idea or not. I have no intention of forcing this.
Best regards.
Saki