#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 趨勢
- 1. #Fliffmas 1,303 posts
- 2. Greenland 33.2K posts
- 3. 60 Minutes 133K posts
- 4. Provo 1,628 posts
- 5. #jonita 9,476 posts
- 6. Kittle 1,725 posts
- 7. Bari Weiss 110K posts
- 8. NextNRG Inc. 1,136 posts
- 9. NXXT 1,328 posts
- 10. The Odyssey 56.3K posts
- 11. Nolan 71.7K posts
- 12. Happy Holidays 69.6K posts
- 13. Arrowhead 2,229 posts
- 14. Utah State 1,428 posts
- 15. Pro Bowl 3,392 posts
- 16. Barry Manilow 1,419 posts
- 17. Lincoln Riley N/A
- 18. Famous Idaho Potato Bowl N/A
- 19. #IDontWantToOverreactBUT N/A
- 20. Chris Rea 22.3K posts
Something went wrong.
Something went wrong.