Re: [RFC] [Discussion] array_match
| From: | Tim Düsterhus | Date: | Sun, 23 Aug 2026 14:23:53 +0000 |
| Subject: | Re: [RFC] [Discussion] array_match | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-132303@lists.php.net to get a copy of this message | ||
Hi
On 8/22/26 17:40, Ayesh Karunaratne wrote:
I'm thumbs down on this for a few reasons. 1. We already haveWith PHP 8.6 this could even just be:str_containsfunction. It is more intuitive that a falsestrposcall, and it makes anarray_filterfunction clean too.array_filter($values, static fn($value) => str_contains($value, 'foo'));
array_filter($values, str_contains(?, 'foo'));Other than that, I agree with your email entirely. Best regards Tim Düsterhus