Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

array_map is variadic. It is actually (callback, ...arr)

One function works against a single element, whereas the other works against multiple. In that case, the parameter order is more meaningful. You can use array_walk if you want (arr, callback), but that only works against a single array -- similarly to array_filter.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: