Skip to content

Comment on Underscore.php

Comments

Perhaps I'm missing something, but what is the benefit of using this? Much of the functionality seems to already be available in the PHP core.

It's available, but you might not be aware of how unintuitive PHP's array functions are. With inconcistencies and gotchas abound they are a chore to use. A wrapper such as this one can greatly enhance your productivity.

Even if it is all available somewhere, I conjecture that it’s a win for those who have a project mixing PHP and Javascript, there can be one consistent style across languages.

raganwald and Ezku hit the nail on the head. Most of my work spans PHP and JS, so having consistency (something the PHP array functions particularly lack) is a big win.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.