6 ms·
For the order of function arguments: sounds like you'd enjoy https://github.com/azjezz/psl https://github.com/azjezz/psl. Yes it's a userland workaround and no
by porker 4y ago
For the order of function arguments: sounds like you'd enjoy https://github.com/azjezz/psl 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.
- user3939382 4y agoYep that's a great library, I'd like to see some of it in core. Same with this: https://github.com/lstrojny/functional-php 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.
- zmxz 4y agoPHP 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?
- withinboredom 4y agoThat lib probably makes any seasoned php dev really confused or think everything is backwards and somehow still works.