PHPackages                             bonu/iterable - 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. bonu/iterable

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

bonu/iterable
=============

Handy utilities for iterables

v1.3.2(5mo ago)1721↓47.2%MITPHPPHP ^8.2CI passing

Since Jul 23Pushed 1mo agoCompare

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

READMEChangelog (6)Dependencies (4)Versions (11)Used By (0)

PHP Iterable
============

[](#php-iterable)

[![PHPUnit](https://github.com/bonu-dev/iterable/actions/workflows/phpunit.yaml/badge.svg?branch=main)](https://github.com/bonu-dev/iterable/actions/workflows/phpunit.yaml)[![Latest Stable Version](https://camo.githubusercontent.com/d6b325b9e3c27f8480d44174c9ec6d258675a34cda918a197634529e475ebc35/68747470733a2f2f706f7365722e707567782e6f72672f626f6e752f6974657261626c652f76)](https://packagist.org/packages/bonu/iterable)[![License](https://camo.githubusercontent.com/06aa25619eca9a223f90a5ba534ddf3c6450248218ce15911fbff387f26b6862/68747470733a2f2f706f7365722e707567782e6f72672f626f6e752f6974657261626c652f6c6963656e7365)](https://packagist.org/packages/bonu/iterable)[![PHP Version](https://camo.githubusercontent.com/eb7d4f5532d8e0a6c418c1704edd86f4b731c66d0113c7db0ca01fb2d2347f8e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626f6e752f6974657261626c652e737667)](https://packagist.org/packages/bonu/iterable)

Handy utility methods that simplify iterable operations.

Requirements
------------

[](#requirements)

- Minimum version of PHP 8.2

Installation
------------

[](#installation)

```
composer require bonu/iterable
```

Usage
-----

[](#usage)

```
use Bonu\Iterable\Iterables;

// ['FOO', 'BAR']
Iterables::map(
    ['foo', 'bar'],
    static fn (string $value): string => mb_strtoupper($value),
);

// ['FOO' => 'foo', 'BAR' => 'bar']
Iterables::mapWithKeys(
    ['foo', 'bar'],
    static fn (string $value): array => [
        mb_strtoupper($value) => $value,
    ],
);

// 'foo'
Iterables::first(['foo', 'bar']);

// false
Iterables::isEmpty(['foo', 'bar']);

// true
Iterables::isNotEmpty(['foo', 'bar']);

// ['foo', 'bar']
Iterables::keys(['foo' => 'bar', 'bar' => 'baz']);

// [[1, 2], [3]]
Iterables::chunk([1, 2, 3], 2);
```

License
-------

[](#license)

This package is licensed under the MIT License.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance81

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.2% 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 ~27 days

Total

6

Last Release

158d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/79c6aec44dcd4096b5f37f6949c22a1c2e43169bce25947838c2f39364e9741f?d=identicon)[MatusBoa](/maintainers/MatusBoa)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (43 commits)")[![MatusBoa](https://avatars.githubusercontent.com/u/8343385?v=4)](https://github.com/MatusBoa "MatusBoa (23 commits)")

---

Tags

iterablephp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bonu-iterable/health.svg)

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

###  Alternatives

[saade/filament-adjacency-list

A Filament package to adjacency lists.

9653.4k5](/packages/saade-filament-adjacency-list)[yidashi/yii2-webuploader

yii2-webuploader

111.1k](/packages/yidashi-yii2-webuploader)

PHPackages © 2026

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