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

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

magroski/php-collections
========================

Collection classes for PHP

1.0.0(3y ago)04.3k↓66.7%MITPHPPHP &gt;=8.1.0

Since Nov 30Pushed 3y agoCompare

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

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

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

30

—

LowBetter than 61% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community16

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 ~0 days

Total

2

Last Release

1357d ago

Major Versions

1.0.0 → 2.x-dev2022-11-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2437681?v=4)[Lucas Magroski](/maintainers/magroski)[@magroski](https://github.com/magroski)

---

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)")[![magroski](https://avatars.githubusercontent.com/u/2437681?v=4)](https://github.com/magroski "magroski (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)")[![tsawler](https://avatars.githubusercontent.com/u/441913?v=4)](https://github.com/tsawler "tsawler (1 commits)")[![bryant1410](https://avatars.githubusercontent.com/u/3905501?v=4)](https://github.com/bryant1410 "bryant1410 (1 commits)")[![vitsadecky](https://avatars.githubusercontent.com/u/1543615?v=4)](https://github.com/vitsadecky "vitsadecky (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/magroski-php-collections/health.svg)

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

###  Alternatives

[josh-taylor/sage-svg

WordPress package to enable a blade directive to use SVG images inline with Sage 9

1846.3k](/packages/josh-taylor-sage-svg)[96qbhy/lbscloud-sdk

LBS.云 PHP SDK

182.4k](/packages/96qbhy-lbscloud-sdk)[smoren/nested-accessor

Accessor for getting and setting values of nested data structures (arrays or objects)

101.1k2](/packages/smoren-nested-accessor)

PHPackages © 2026

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