Use a simple foreach here because array_map only supports lambda function as of PHP 5.3.0
Merge pull request #14 from por/master

Add support for older PHP 5.x.x versions