Popularity
6.5
Growing
Activity
0.0
Stable
1,041
44
82

Description

First off : Underscore.php is not a PHP port of Underscore.js (well ok I mean it was at first). It's doesn't aim to blatantly port its methods, but more port its philosophy.

It's a full-on PHP manipulation toolbet sugar-coated by an elegant syntax directly inspired by the Laravel framework. Out through the window went the infamous __(), replaced by methods and class names that are meant to be read like sentences à la Rails : Arrays::from($article)->sortBy('author')->toJSON().

It features a good hundred of methods for all kinds of types : strings, objects, arrays, functions, integers, etc., and provides a parsing class that help switching from one type to the other mid-course. Oh also it's growing all the time. The cherry on top ? It wraps nicely around native PHP functions meaning Strings::replace is actually a dynamic call to str_replace but with the benefit of allowed chaining and a finally consistant argument order (all functions in Underscore put the subject as the first argument, NO MATTER WHAT).

It works both as a stand-alone via Composer or as a bundle for the Laravel framework. So you know, you don't really have any excuse.

Code Quality Rank: L4
Monthly Downloads: 110,662
Programming language: PHP
License: MIT License
Tags: Miscellaneous     Laravel     Toolkit     Internals    

Underscore alternatives and related libraries

Based on the "Miscellaneous" category

Do you think we are missing an alternative of Underscore or a related project?

Add another 'Miscellaneous' Library

Underscore Recommendations

There are no recommendations yet. Be the first to promote Underscore!

Have you used Underscore? Share your experience. Write a short recommendation and Underscore, you and your project will be promoted on Awesome PHP.
Recommend Underscore

Recently added Underscore resources

Do you know of a usefull tutorial, book or news relevant to Underscore?
Be the first to add one!