zlacker

[parent] [thread] 3 comments
1. porker+(OP)[view] [source] 2022-12-08 14:05:11
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.

replies(2): >>user39+Q4 >>zmxz+8j
2. user39+Q4[view] [source] 2022-12-08 14:36:43
>>porker+(OP)
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.

3. zmxz+8j[view] [source] 2022-12-08 15:49:37
>>porker+(OP)
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?

replies(1): >>within+ii1
◧◩
4. within+ii1[view] [source] [discussion] 2022-12-08 20:31:33
>>zmxz+8j
That lib probably makes any seasoned php dev really confused or think everything is backwards and somehow still works.
[go to top]