PHP port of Underscore.js