3 ms·
It still is cumbersome: array_filter(arr, fn) array_reduce(arr, fn) array_map(fn, arr1[, arr2, ...]) array_walk(&arr, fn) Not mentioning additional pa
by pstadler 7y ago
It still is cumbersome:
array_filter(arr, fn)
array_reduce(arr, fn)
array_map(fn, arr1[, arr2, ...])
array_walk(&arr, fn)
Not mentioning additional parameters such as `$flag`, `$userdata` or `$clownshow`.
- mattacular 7y agoI think you're the first to point this out. Thank you so much; I just uninstalled php.
- pstadler 7y agoSorry, this wasn't meant for you as a power user, but for the uninitiated who might gets the impression that things are great.
- derision 7y agoUse eloquent collections instead of vanilla arrays and you'll be much happier
- lowercased 7y agoAFAIK, they're just laravel collections - it's (I believe) a separate package you can install which doesn't necessarily have anything to do with laravel eloquent directly. The collections package I'm thinking of might be an unofficial port/extraction of laravel collection stuff. my brother has, I think, started using these in non-laravel projects because he likes the syntax.