A set of functional primitives for PHP, heavily inspired by Scala’s traversable collection, Dojo’s array functions and Underscore.js
Functional PHP alternatives and similar libraries
Based on the "Architectural" category.
Alternatively, view Functional PHP alternatives based on common mentions on social networks and blogs.
9.8 8.0 L5 Functional PHP VS Design Patterns PHPsample code for several design patterns in PHP 8
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Functional PHP or a related project?
Functional PHP: Functional primitives for 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.
- Works with arrays and everything implementing interface
- Consistent interface: for functions taking collections and callbacks, first parameter is always the collection, then the callback.
Callbacks are always passed
$collection. Strict comparison is the default but can be changed
- Calls 5.3 closures as well as usual callbacks
- All functions reside in namespace
Functionalto not raise conflicts with any other extension or library
Run the following command in your project root:
composer require lstrojny/functional-php
[Read the docs](docs/functional-php.md)
- Fork and
git clonethe project
- Install dependencies via
- Run the tests via
composer run tests
- Write code and create a PR
- General help and development list: http://groups.google.com/group/functional-php
- Commit list: http://groups.google.com/group/functional-php-commits