[php] Fix strange .map() behaviour.