An implementation of the autoCurry function from wu.js for PHP