Re: [RFC] [Discussion] array_str_contains() for PHP 8.7

From: Date: Mon, 31 Aug 2026 13:01:32 +0000
Subject: Re: [RFC] [Discussion] array_str_contains() for PHP 8.7
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-132397@lists.php.net to get a copy of this message
Hi سپهر ‪On Mon, Aug 31, 2026 at 12:21 AM ‫سپهر محمودی‬‎ <sepehrphpr@gmail.com> wrote:‬ > While array_filter with a closure can achieve this, it > introduces > noticeable overhead in userland due to repeated closure invocations and > type checks on every element. > >> If this overhead could be reduced, it would improve the performance of any built-in function that calls a user-land closure, not limited to the array_filter + str_contains combo. Have you considered solving this problem instead, at least for closures generated by partial applications of built-in functions? -- Best regards, Bruce Weirdan mailto: weirdan@gmail.com

« previous php.internals (#132397) next »