zlacker

[return to "PHP 8.2"]
1. user39+j7[view] [source] 2022-12-08 13:16:18
>>TimWol+(OP)
The worst part about PHP is constantly hearing from its detractors, who are often people who haven’t used the language in many years. Haystack needle order, $, fractal of bad design, it just gets old.

The language isn’t perfect but I love working with it, these 8.1 and 8.2 improvements have really made it sweet.

My biggest gripe at the moment is the (very old) behavior of e.g. preg_match() and sort(). You’ve got a small handful of these common functions that operate on their input by reference/in place which is gross. A new version of these would be welcome.

◧◩
2. porker+2e[view] [source] 2022-12-08 14:05:11
>>user39+j7
For the order of function arguments: sounds like you'd enjoy https://github.com/azjezz/psl.

Yes it's a userland workaround and not a fix for the language, but it's thinking about these issues and a PHP extension (offering better performance) is being talked about.

◧◩◪
3. user39+Si[view] [source] 2022-12-08 14:36:43
>>porker+2e
Yep that's a great library, I'd like to see some of it in core. Same with this: https://github.com/lstrojny/functional-php which overlaps somewhat.

The no-brainers to me are the missing array_some()/array_any() array_every()/array_all() and an array_search() that takes a predicate and iterable. I do these now in userland but an optimized native version would be nice.

[go to top]