PHPackages                             danielgsims/php-collections - 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. danielgsims/php-collections

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

danielgsims/php-collections
===========================

Collection classes for PHP

2.2.2(7y ago)141409.1k—7.2%37[2 PRs](https://github.com/danielgsims/php-collections/pulls)8MITPHPPHP &gt;=5.4.0CI failing

Since Nov 4Pushed 3y ago13 watchersCompare

[ Source](https://github.com/danielgsims/php-collections)[ Packagist](https://packagist.org/packages/danielgsims/php-collections)[ RSS](/packages/danielgsims-php-collections/feed)WikiDiscussions 2.X Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (30)Used By (8)

phpcollections
==============

[](#phpcollections)

This library contains two collection classes: an array list, and a dictionary. Both of these classes are immutable. If you add or remove items from these collections, you will receive a new instance with the changes applied.

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

[](#requirements)

Requires PHP 5.4 or greater, dev reqiures PHP 5.5 or greater.

Collection
==========

[](#collection)

A PHP implementation of an array list. This type of this class is specified at construction. The class will perform runtime type checks to validate the appropriate values are being added. Many of the standard PHP array functionality is encapsulated in this class.

The following types are supported

- int or integer
- bool or boolean
- float or double
- array
- object
- callable
- A class name, abstract class name or interface

The collection will check inheritance, so if you require a base class, derived classes can be added safely.

Dictionary
==========

[](#dictionary)

The dictionary works like an immutable associative array where you map keys to values. This implementation supports runtime type safety checks. Review the Collection section for supported types.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity53

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~76 days

Recently: every ~88 days

Total

24

Last Release

2818d ago

Major Versions

1.4.8 → 2.0.02016-06-11

1.x-dev → 2.0.12016-07-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c96c41d0d99dc544740ceeb437dd1baa158fd0a8badc97936161821efbb07a0?d=identicon)[danielgsims](/maintainers/danielgsims)

---

Top Contributors

[![danielgsims](https://avatars.githubusercontent.com/u/695933?v=4)](https://github.com/danielgsims "danielgsims (60 commits)")[![duvalentini](https://avatars.githubusercontent.com/u/7682819?v=4)](https://github.com/duvalentini "duvalentini (17 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")[![dkraczkowski](https://avatars.githubusercontent.com/u/578333?v=4)](https://github.com/dkraczkowski "dkraczkowski (1 commits)")[![hultberg](https://avatars.githubusercontent.com/u/1257913?v=4)](https://github.com/hultberg "hultberg (1 commits)")[![jakubgiminski](https://avatars.githubusercontent.com/u/1197853?v=4)](https://github.com/jakubgiminski "jakubgiminski (1 commits)")[![jamesthomasonjr](https://avatars.githubusercontent.com/u/691492?v=4)](https://github.com/jamesthomasonjr "jamesthomasonjr (1 commits)")[![jmrieger](https://avatars.githubusercontent.com/u/9476375?v=4)](https://github.com/jmrieger "jmrieger (1 commits)")[![omnisite](https://avatars.githubusercontent.com/u/1994220?v=4)](https://github.com/omnisite "omnisite (1 commits)")[![REDNBLACK](https://avatars.githubusercontent.com/u/1498939?v=4)](https://github.com/REDNBLACK "REDNBLACK (1 commits)")[![bryant1410](https://avatars.githubusercontent.com/u/3905501?v=4)](https://github.com/bryant1410 "bryant1410 (1 commits)")[![tsawler](https://avatars.githubusercontent.com/u/441913?v=4)](https://github.com/tsawler "tsawler (1 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")[![danfah](https://avatars.githubusercontent.com/u/9998408?v=4)](https://github.com/danfah "danfah (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/danielgsims-php-collections/health.svg)

```
[![Health](https://phpackages.com/badges/danielgsims-php-collections/health.svg)](https://phpackages.com/packages/danielgsims-php-collections)
```

###  Alternatives

[nikic/iter

Iteration primitives using generators

1.1k5.9M38](/packages/nikic-iter)[ttskch/select2-bootstrap4-theme

Select2 v4 theme for Bootstrap4

43424.6k2](/packages/ttskch-select2-bootstrap4-theme)

PHPackages © 2026

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