PHPackages                             ta-tikoma/bind - 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. ta-tikoma/bind

ActiveLibrary

ta-tikoma/bind
==============

bind method for binding argument to callable

1.0.0(6mo ago)0175MITPHP

Since Nov 13Pushed 5mo agoCompare

[ Source](https://github.com/ta-tikoma/bind)[ Packagist](https://packagist.org/packages/ta-tikoma/bind)[ RSS](/packages/ta-tikoma-bind/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

BIND
====

[](#bind)

There is only two functions in this package: `bind` and `flip`, for make you code short.

Install
-------

[](#install)

`composer require ta-tikoma/bind`

Examples
--------

[](#examples)

### Example 1 (Simple)

[](#example-1-simple)

#### Before

[](#before)

`array_map(static fn (string $s) => substr($s, 2), ['a_bar', 'a_foo', 'a_boo'])`

#### After

[](#after)

`array_map(bind(substr(...), 2), ['a_bar', 'a_foo', 'a_boo'])`

### Example 2 (Pipe)

[](#example-2-pipe)

#### Before

[](#before-1)

```
$result = 'Hello World'
    |> static fn (string $s) => explode(' ', $s)
    |> static fn (array $a) => array_filter($a, static fn (string $s) => str_starts_with($s, 'H'))
```

#### After

[](#after-1)

```
$result = 'Hello World'
    |> bind(flip(explode(...)), ' ')
    |> bind(array_filter(...), bind(str_starts_with(...), 'H'))
```

### Example 3 (Collection)

[](#example-3-collection)

#### Before

[](#before-2)

```
$result = collect(['1', '2', '3'])->map(static fn (string $number) => (int) $number);
```

#### After

[](#after-2)

```
$result = collect(['1', '2', '3'])->map(bind(intval(...)));
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance69

Regular maintenance activity

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

187d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bf0bc8b0fdacd90ce833f2956df805434b84b1daafa8bbdf1dfdd79ce36b6f2?d=identicon)[ta-tikoma](/maintainers/ta-tikoma)

---

Top Contributors

[![ta-tikoma](https://avatars.githubusercontent.com/u/2934128?v=4)](https://github.com/ta-tikoma "ta-tikoma (9 commits)")

---

Tags

callablefunctionalbinding

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ta-tikoma-bind/health.svg)

```
[![Health](https://phpackages.com/badges/ta-tikoma-bind/health.svg)](https://phpackages.com/packages/ta-tikoma-bind)
```

###  Alternatives

[spatie/once

A magic memoization function

1.4k29.1M79](/packages/spatie-once)[lstrojny/functional-php

Functional primitives for PHP

2.0k7.3M48](/packages/lstrojny-functional-php)[nikic/iter

Iteration primitives using generators

1.1k5.9M38](/packages/nikic-iter)[php-di/invoker

Generic and extensible callable invoker

26857.8M56](/packages/php-di-invoker)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[lambdish/phunctional

λ PHP functional library

3612.0M23](/packages/lambdish-phunctional)

PHPackages © 2026

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