#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 Trends
- 1. Colts 47.3K posts
- 2. Rivers 58.4K posts
- 3. Brock Purdy 16.3K posts
- 4. Niners 8,619 posts
- 5. #FTTB 6,637 posts
- 6. Kittle 8,750 posts
- 7. Ballard 2,965 posts
- 8. gaten 3,965 posts
- 9. Dee Winters 2,272 posts
- 10. Adam the Woo 2,597 posts
- 11. #WWERaw 22.2K posts
- 12. Tonges 1,319 posts
- 13. #SFvsIND 2,222 posts
- 14. #ForTheShoe 2,445 posts
- 15. Jennings 15.9K posts
- 16. Alec Pierce 3,616 posts
- 17. Tyler Warren 2,370 posts
- 18. Jonathan Taylor 3,355 posts
- 19. #LADS2ndAnniversary 6,237 posts
- 20. Ivey 1,097 posts
Something went wrong.
Something went wrong.