Skip to content

Comment on Underscore.php

Comments

This is terribly misguided.

You do know that PHP has built-in min and max functions, right?

  And array_map. 
  And array_walk. 
  And array_filter. 
  And array_reduce. 
  And array_slice. 
  And array_unique. 
  And array_search. 
  And range. 
  And empty. 
  And is_object. 
  And is_array.

All of the array_* functions, as their names suggest, only apply to arrays. Underscore methods work on arrays or any Traversable (Iterator or IteratorAggregate) object. It's nice to have.

AboutSource Built by g1lg1l

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