php port of underscore.js