Primitives for functional programming in PHP
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-phpgit clone the projectcomposer installcomposer run testsFunctional\flatten()Functional\\unique(), Functional\invoke_first(),
Functional\invoke_last() and all the discussionsNo open issues yet, or sync has not completed.