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

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

g4/collection
=============

collection php library

3.0.0(2y ago)066.0k↓33.3%4MITPHPPHP &gt;=8.2

Since Dec 2Pushed 2y ago10 watchersCompare

[ Source](https://github.com/g4code/collection)[ Packagist](https://packagist.org/packages/g4/collection)[ RSS](/packages/g4-collection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (14)Used By (0)

collection
==========

[](#collection)

> collection - [php](http://php.net) library

[![Build Status](https://camo.githubusercontent.com/dd3eeb92032a5d51198aaeddb62a2601d716b2708939e9ec9e5d59bd8267c600/68747470733a2f2f7472617669732d63692e6f72672f6734636f64652f636f6c6c656374696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/g4code/collection)

Install
-------

[](#install)

```
$ composer require g4/collection

```

Usage
-----

[](#usage)

Development
-----------

[](#development)

### Install dependencies

[](#install-dependencies)

```
$ composer install

```

### Run tests

[](#run-tests)

```
$ composer test

```

License
-------

[](#license)

(The MIT License) see LICENSE file for details...

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 56.8% 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 ~241 days

Recently: every ~473 days

Total

13

Last Release

925d ago

Major Versions

1.0.0 → 2.0.02017-05-17

2.5.1 → 3.0.02023-11-06

PHP version history (2 changes)1.0.0PHP &gt;=5.6

3.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/12ceafbc629c3019d7cd78dfec322d694f44e0df8741bc6044f4acbf99964ff8?d=identicon)[g4code](/maintainers/g4code)

---

Top Contributors

[![gomboc](https://avatars.githubusercontent.com/u/1145653?v=4)](https://github.com/gomboc "gomboc (25 commits)")[![sinisalackovic](https://avatars.githubusercontent.com/u/25299913?v=4)](https://github.com/sinisalackovic "sinisalackovic (10 commits)")[![UrosPurtic](https://avatars.githubusercontent.com/u/52161020?v=4)](https://github.com/UrosPurtic "UrosPurtic (5 commits)")[![ppavlovic](https://avatars.githubusercontent.com/u/2664974?v=4)](https://github.com/ppavlovic "ppavlovic (1 commits)")[![petarkapulica](https://avatars.githubusercontent.com/u/10419668?v=4)](https://github.com/petarkapulica "petarkapulica (1 commits)")[![mirko-bukilic](https://avatars.githubusercontent.com/u/76707321?v=4)](https://github.com/mirko-bukilic "mirko-bukilic (1 commits)")[![NebojsaStanicCP](https://avatars.githubusercontent.com/u/59829717?v=4)](https://github.com/NebojsaStanicCP "NebojsaStanicCP (1 commits)")

---

Tags

iteratorcollectionlistcountable

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[phpcollection/phpcollection

General-Purpose Collection Library for PHP

1.0k64.0M34](/packages/phpcollection-phpcollection)[loophp/collection

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

745663.8k13](/packages/loophp-collection)[athari/yalinqo

YaLinqo, a LINQ-to-objects library for PHP

4561.2M5](/packages/athari-yalinqo)[ihor/nspl

Non-standard PHP library (NSPL) - functional primitives toolbox and more

381368.5k](/packages/ihor-nspl)[chdemko/sorted-collections

Sorted Collections for PHP &gt;= 8.2

222.5M3](/packages/chdemko-sorted-collections)[graze/sort

A collection of array sorting transforms and functions

12289.6k2](/packages/graze-sort)

PHPackages © 2026

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