cline/fp
| Install | |
|---|---|
composer require cline/fp |
|
| Latest Version: | 2.0.3 |
| PHP: | ^8.5.0 |
| License: | MIT |
| Last Updated: | Mar 18, 2026 |
| Links: | GitHub · Packagist |
This library contains functional utilities intended for use with PHP 8.4 and later. Its primary tool is the pipe() function, which takes a starting argument and then a series of callables to "pipe" that argument through. Most other functions are utilities that produce a closure that takes the return from a previous pipe() step as its only argument.
Requirements
Requires PHP 8.4+
Installation
composer require cline/fp
Documentation
- Pipes and Composition - Introduction to
pipe()andcompose()functions - Pipeable Functions - Understanding partially applied functions
- String Functions - String manipulation utilities
- Object Functions - Object property and method utilities
- Array Functions - Comprehensive array operations (map, filter, reduce, etc.)
- Utility Traits -
EvolvableandNewabletraits for functional object patterns - Examples - Real-world usage examples and patterns
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
Credits
License
The MIT License. Please see License File for more information.
Related Packages
Immutable numeric value object with chainable arithmetic operations and Laravel...
toastr.js for Laravel 5.2 easy notification like growl for example