PHPackages                             emonkak/collection - 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. emonkak/collection

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

emonkak/collection
==================

A collection library as a container for aggregation of objects

v2.0.0(10y ago)1616.1k—7.5%1[1 issues](https://github.com/emonkak/php-collection/issues)MITPHPPHP &gt;=5.4.0

Since Jul 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/emonkak/php-collection)[ Packagist](https://packagist.org/packages/emonkak/collection)[ Docs](https://github.com/emonkak/php-collection)[ RSS](/packages/emonkak-collection/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

Emonkak\\Collection
===================

[](#emonkakcollection)

[![Build Status](https://camo.githubusercontent.com/b57d55969457fe73480c86b5ca3e4b0e83f143abf6c1525b6c6f44b6dc9b4d42/68747470733a2f2f7472617669732d63692e6f72672f656d6f6e6b616b2f7068702d636f6c6c656374696f6e2e737667)](https://travis-ci.org/emonkak/php-collection)[![Coverage Status](https://camo.githubusercontent.com/3a7be5dc53fb3708e68768d6519dcbaaa203d3885b62644618c2b1a581e510dc/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f656d6f6e6b616b2f7068702d636f6c6c656374696f6e2f62616467652e737667)](https://coveralls.io/r/emonkak/php-collection)

A collection library as a container for aggregation of objects.

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

[](#requirements)

- PHP 5.4 or higher
- [Composer](http://getcomposer.org/)

Licence
-------

[](#licence)

MIT Licence

Example
-------

[](#example)

```
// Take five elements from a infinite list of even numbers.
Collection::iterate(0, function($n) { return $n + 1; })
    ->filter(function($n) { return $n % 2 === 0; })
    ->take(5)
    ->each(function($n) { echo $n, PHP_EOL; });
// => 0
//    2
//    4
//    6
//    8
```

Documentation
-------------

[](#documentation)

Please see [Wiki](https://github.com/emonkak/php-collection/wiki). (but wiki pages are Japanese only)

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 99.6% 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 ~79 days

Recently: every ~199 days

Total

12

Last Release

3843d ago

Major Versions

0.3.0 → v1.0.02015-05-13

v1.0.2 → v2.0.02015-12-16

PHP version history (2 changes)0.1.0PHP &gt;=5.3.0

0.2.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/482d690ac653e05c9f5625e0f5f6e71b55e77646ab722bbcfdfbd26bf3c8d86b?d=identicon)[emonkak](/maintainers/emonkak)

---

Top Contributors

[![emonkak](https://avatars.githubusercontent.com/u/188621?v=4)](https://github.com/emonkak "emonkak (469 commits)")[![genzouw](https://avatars.githubusercontent.com/u/29957?v=4)](https://github.com/genzouw "genzouw (1 commits)")[![sasezaki](https://avatars.githubusercontent.com/u/42755?v=4)](https://github.com/sasezaki "sasezaki (1 commits)")

---

Tags

arraygeneratoriteratorcollectionenumerable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/emonkak-collection/health.svg)

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

###  Alternatives

[athari/yalinqo

YaLinqo, a LINQ-to-objects library for PHP

4531.2M5](/packages/athari-yalinqo)[loophp/collection

A (memory) friendly, easy, lazy and modular collection class.

743730.3k15](/packages/loophp-collection)[aimeos/map

Easy and elegant handling of PHP arrays as array-like collection objects similar to jQuery and Laravel Collections

4.3k443.7k14](/packages/aimeos-map)[nikic/iter

Iteration primitives using generators

1.1k6.2M51](/packages/nikic-iter)[ginq/ginq

LINQ to Object inspired DSL for PHP

192258.2k3](/packages/ginq-ginq)[chdemko/sorted-collections

Sorted Collections for PHP &gt;= 8.4

222.6M3](/packages/chdemko-sorted-collections)

PHPackages © 2026

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