Unfortunately array_map only accepts arrays. Foreach looks more understandable (and performant) this way.