# ramsey/collection

:card_index_dividers: A PHP library for representing and manipulating collections.

Repository: https://github.com/ramsey/collection
Canonical: https://ross.abutalabs.com/products/ramsey-collection
Language: PHP
License: MIT
License Family: permissive
Topics: collection, array, hash, map, queue, set, php, php8
Last push: 2026-08-17T18:57:52+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 40, longevity 100
- inputs: {"age_days": 3963, "days_push": 16, "days_rel": 529, "gap_med": 20, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1200, forks 54 (observed 2026-08-28T04:03:57.960905+00:00)

## What it is
ramsey/collection is a PHP library for representing and manipulating collections such as arrays, maps, queues, and sets, inspired by the Java Collections Framework. It is installed via Composer and supports PHP 8.

## Use cases
- work with typed collections in php
- manipulate arrays maps queues and sets in php
- java collections framework style api for php
- add collection data structures to a php8 project
- filter and sort collections of objects in php

## When to choose
- you need structured, object-oriented collection classes in a PHP project
- you want a well-maintained MIT-licensed library with PHP 8 support
- you prefer a Java Collections Framework-inspired API

## When to avoid
- plain PHP arrays and built-in array functions are sufficient for your needs
- you are working in a language other than PHP
- you need heavyweight data-processing pipelines better served by dedicated libraries

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: programming-languages, developer-tools
- platform: php, cross-platform
- tags: collections, arrays, data-structures, php8, composer, algorithms

## Member repositories
- ramsey/collection (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:57.960905+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:20:50.931610+00:00, confidence not recorded.
  - readme: https://github.com/ramsey/collection (fetched 2026-08-28T04:03:57.960905+00:00, sha debfe82cda9d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
