NOTE: functional-php used to come with a C extension that implemented most of the functions natively. As the performance differences weren’t that huge compared to the maintenance cost it has been removed.
A set of functional primitives for PHP, heavily inspired by Scala’s traversable collection, Dojo’s array functions and Underscore.js
Traversable$value, $index, $collection. Strict comparison is the default but can be changedFunctional to not raise conflicts with any other extension or libraryRun the following command in your project root:
composer require lstrojny/functional-php
git clone the projectcomposer installcomposer run testsFunctional\flatten()Functional\unique(), Functional\invoke_first(),
Functional\invoke_last() and all the discussions1,339 followers · starred Aug 2014
4,385 followers · starred Oct 2018
1,203 followers · starred Mar 2021
751 followers · starred Oct 2018
NOTE: functional-php used to come with a C extension that implemented most of the functions natively. As the performance differences weren’t that huge compared to the maintenance cost it has been removed.
A set of functional primitives for PHP, heavily inspired by Scala’s traversable collection, Dojo’s array functions and Underscore.js
Traversable$value, $index, $collection. Strict comparison is the default but can be changedFunctional to not raise conflicts with any other extension or libraryRun the following command in your project root:
composer require lstrojny/functional-php
git clone the projectcomposer installcomposer run testsFunctional\flatten()Functional\unique(), Functional\invoke_first(),
Functional\invoke_last() and all the discussions1,339 followers · starred Aug 2014
4,385 followers · starred Oct 2018
1,203 followers · starred Mar 2021
751 followers · starred Oct 2018