News for hackers. Stuff that matters.
Re:A look at modern PHP by ragnese on Tuesday May 05, 2020 @01:47PM (#23082690)
Except that if you do anything other than mapping, you start taking a performance hit. If you want to use array_map with array_filter, you're now iterating your array twice. Also, if you ever use array_filter, you almost certainly need to wrap it in array_values, so now you're looping N times.

It's no wonder people still lean on the broken foreach. I always use unset() after foreach. It makes me die inside a little.

There are no comments on this comment yet.