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. zmxz+ax[view] [source] 2022-12-08 15:49:37
>>porker+2e
PHP 8.0.0 introduced named arguments which allow for arbitrary argument order. That was nearly 2 years ago exactly to date.

What does that lib do that PHP doesn't?

[go to top]