PHPackages                             bendamqui/fp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bendamqui/fp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bendamqui/fp
============

Functional programming utils.

2.0(9mo ago)013[2 PRs](https://github.com/bendamqui/php-fp/pulls)MITPHPPHP ^8.4CI passing

Since Mar 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/bendamqui/php-fp)[ Packagist](https://packagist.org/packages/bendamqui/fp)[ RSS](/packages/bendamqui-fp/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (2)Versions (7)Used By (0)

Installation
============

[](#installation)

`composer require bendamqui/fp`

Functions
---------

[](#functions)

### flow(callable ...$fns): Closure

[](#flowcallable-fns-closure)

Pipe functions into a new function, applying them from left to right.

```
$add = fn($x) => fn($y) => $x + $y;
$fn = flow($add(1), $add(2), $add(4));
$fn(0); // => 7
```

### pipe(mixed $value, callable ...$fns): mixed

[](#pipemixed-value-callable-fns-mixed)

Pipe a value through functions from left to right.

```
$add = fn($x) => fn($y) => $x + $y;
pipe(0, $add(1), $add(2), $add(4)); // => 7
```

### compose(callable ...$fns): Closure

[](#composecallable-fns-closure)

Compose functions into a new function, applying them from right to left.

```
$add = fn($x) => fn($y) => $x + $y;
$fn = compose($add(1), $add(2), $add(3));
$fn(0); // => 6
```

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance78

Regular maintenance activity

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1972 days

Total

2

Last Release

272d ago

Major Versions

v1.0 → 2.02025-08-18

PHP version history (2 changes)v1.0PHP ^7.2

2.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9826e78067c15bf9543e058ff3552324010adfe3adc3796e45db311c298dd64?d=identicon)[bendamqui](/maintainers/bendamqui)

---

Top Contributors

[![bendamqui](https://avatars.githubusercontent.com/u/2272632?v=4)](https://github.com/bendamqui "bendamqui (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bendamqui-fp/health.svg)

```
[![Health](https://phpackages.com/badges/bendamqui-fp/health.svg)](https://phpackages.com/packages/bendamqui-fp)
```

###  Alternatives

[alibayat/laravel-commentable

Implementing a Comment system for Laravel's Eloquent models.

187.8k](/packages/alibayat-laravel-commentable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
