Move to userland php implementation for filter() and map()