News for hackers. Stuff that matters.
Re:PHP 8.2 by porker on Thursday December 08, 2022 @09:05AM (#33907966)
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.

Re:PHP 8.2 by user3939382 on Thursday December 08, 2022 @09:36AM (#33908266)
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.

Re:PHP 8.2 by zmxz on Thursday December 08, 2022 @10:49AM (#33909152)
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?

Re:PHP 8.2 by withinboredom on Thursday December 08, 2022 @03:31PM (#33912944)
That lib probably makes any seasoned php dev really confused or think everything is backwards and somehow still works.