# php-ds/ext-ds

Extension for specialized native data structures in PHP

Repository: https://github.com/php-ds/ext-ds
Canonical: https://ross.abutalabs.com/products/ext-ds
Homepage: https://medium.com/p/9dda7af674cd
Language: PHP
License: MIT
License Family: permissive
Topics: pecl, php, data-structures, extension
Last push: 2026-04-14T21:45:23+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 77, release rhythm 78, longevity 100
- inputs: {"age_days": 3866, "days_push": 141, "days_rel": 144, "gap_med": 0.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2150, forks 100 (observed 2026-08-28T04:06:19.291466+00:00)

## What it is
A PHP extension (PECL package 'ds') providing specialized native data structures like Seq, Map, Set, Heap, and Pair as efficient alternatives to PHP arrays. Version 2.0 offers a simplified API with copy-on-write semantics for safe iteration during mutation.

## Use cases
- use efficient sequences instead of php arrays
- need a map with arbitrary keys in php
- fast set operations in php
- priority queue or heap for php
- stack and queue data structures in php

## When to choose
- you need better performance than php arrays for collections
- you want typed, purpose-built data structures in php 8.2+

## When to avoid
- you cannot install PECL extensions on your host
- your project must run on php < 8.2

## Facets
- artifact type: library
- maturity: active
- function: data-science
- domain: developer-tools, performance
- platform: php, windows
- tags: data-structures, pecl, php-extension, collections, ds, algorithms, linux, macos

## Member repositories
- php-ds/ext-ds (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:19.291466+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-30T02:50:58.176666+00:00, confidence not recorded.
  - readme: https://github.com/php-ds/ext-ds (fetched 2026-08-28T04:06:19.291466+00:00, sha 97f2f2aab0bd)
  - homepage: https://medium.com/p/9dda7af674cd (fetched 2026-08-29T10:30:45.718216+00:00, sha 471576e4392f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
