Fix #3: use a simple foreach loop instead of array_map with an anonymous function passed as a param to avoid issues with PHP pre-5.2.