On Sun, Aug 23, 2026, at 10:45 AM, Ayesh Karunaratne wrote: > Newer functions like `str_contains`, `str_ends_with`, `array_find`, > etc had a strong argument in favor of them, that they improve the > ergonomics of the language. With the PFA syntax like Tim mentioned > (and contributed!), I would pick the PFA approach any day of the week:
Fact check: PFA was written by Arnaud Le Blanc, designed by myself along with Joe Watkins, Levi Morrison, and a few others back in 2021. Tim was an active reviewer to the RFC but did not author it. (He has authored other successful and valuable RFCs.) > ```php > array_filter($values, str_contains(?, 'foo')); > ``` > > I'm truly thankful that you're spending time to improve PHP, and I > really don't mean to sound discouraging from this email. I just think > that that is still a room in PHP for Engine optimizations and bottle > necks that PHP could use your expertise. A new `array_str_contains` > function might not get the same approval and agreement and, that, > might in fact, discourage you. I think there's an XY problem going on here. Sephr, you seem based on your RFC proposals to be very concerned about the performance of massively huge arrays. As others have noted, in general massively huge arrays in memory is a code smell, and indicates that you should be using a different approach to begin with. (It could be doing more work in SQL, or streaming data from a file using generators, or various other things.) Perhaps you can describe your actual use case better, and we can point you at a more effective solution that doesn't require custom C functions. If it really does involve custom C functions, then you're definitely into territory where writing a small custom extension for your project specifically is a worthwhile thing to do, and then you wouldn't need to go through the RFC process at all. --Larry Garfield
