#phpwishlist not_null() not_string() not_callable() not_a() ... Yeah, I realize that `!` exists, but (a) fluent, and (b) can be called by name where a callable would be expected. Thoughts?


I’d love currying and functions as values so you could write: not(is_null) and use that. In lieu of that tho: yeah these fns would be nice.


Yeah, but I also want to be able to do: $foo = array_filter($bar, 'not_null');


Ah yeah. I got that. I more meant that if those things were supported you could write: $foo = array_filter($bar, not(is_null)); or $foo = array_filter($bar, not(any_fn_here)); But still having the not_null alias would be nice.


Hm. You can do something like that in 7.4: $foo = array_filter($bar, fn($v) => ! is_null($v));


United States 趨勢
Loading...

Something went wrong.


Something went wrong.