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

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

php-ds/php-ds
=============

Specialized data structures as alternatives to the PHP array

v1.7.0(1y ago)4108.8M—5.1%48[10 issues](https://github.com/php-ds/polyfill/issues)[3 PRs](https://github.com/php-ds/polyfill/pulls)20MITPHPPHP &gt;=7.4

Since Mar 4Pushed 12mo ago18 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (17)Used By (20)

Data Structures for PHP
=======================

[](#data-structures-for-php)

[![Build Status](https://github.com/php-ds/polyfill/workflows/CI/badge.svg)](https://github.com/php-ds/polyfill/actions?query=workflow%3A%22CI%22+branch%3Amaster)[![Packagist](https://camo.githubusercontent.com/d1331fa5bc6c90d814e2871eece5390e904400042bca837b756c9a375420564a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d64732f7068702d64732e737667)](https://packagist.org/packages/php-ds/php-ds)

This is a compatibility polyfill for the [extension](https://github.com/php-ds/extension). You should include this package as a dependency of your project to ensure that your codebase would still be functional in an environment where the extension is not installed. The polyfill will not be loaded if the extension is installed and enabled.

Install
-------

[](#install)

```
composer require php-ds/php-ds
```

You can also *require* that the extension be installed using `ext-ds`.

Test
----

[](#test)

```
composer install
composer test

```

Make sure that the *ds* extension is not enabled, as the polyfill will not be loaded if it is. The test output will indicate whether the extension is active.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for more information.

### Credits

[](#credits)

- [Rudi Theunissen](https://github.com/rtheunissen)
- [Joe Watkins](https://github.com/krakjoe)

### License

[](#license)

The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance49

Moderate activity, may be stable

Popularity66

Solid adoption and visibility

Community46

Growing community involvement

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 73% 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 ~267 days

Recently: every ~319 days

Total

13

Last Release

366d ago

Major Versions

1.2.x-dev → 2.0.x-dev2016-12-19

PHP version history (5 changes)v1.0.2PHP &gt;=7

v1.0.3PHP &gt;=7.0.0

v1.4.0PHP ^7.3 || ~8.0.0 || ~8.1.0

v1.4.1PHP &gt;=7.0

v1.6.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/761df764fa80c32031884a5dd2376cf7e70c0fa152eaa141fd68f12b4a761b9f?d=identicon)[rtheunissen](/maintainers/rtheunissen)

---

Top Contributors

[![rtheunissen](https://avatars.githubusercontent.com/u/809191?v=4)](https://github.com/rtheunissen "rtheunissen (168 commits)")[![simPod](https://avatars.githubusercontent.com/u/327717?v=4)](https://github.com/simPod "simPod (20 commits)")[![dantudor](https://avatars.githubusercontent.com/u/1281127?v=4)](https://github.com/dantudor "dantudor (19 commits)")[![fanlei](https://avatars.githubusercontent.com/u/1195782?v=4)](https://github.com/fanlei "fanlei (5 commits)")[![iggyvolz](https://avatars.githubusercontent.com/u/2197376?v=4)](https://github.com/iggyvolz "iggyvolz (2 commits)")[![billythekid](https://avatars.githubusercontent.com/u/330170?v=4)](https://github.com/billythekid "billythekid (2 commits)")[![ZebulanStanphill](https://avatars.githubusercontent.com/u/19592990?v=4)](https://github.com/ZebulanStanphill "ZebulanStanphill (2 commits)")[![Osukaru](https://avatars.githubusercontent.com/u/249598?v=4)](https://github.com/Osukaru "Osukaru (1 commits)")[![ricardoboss](https://avatars.githubusercontent.com/u/6266356?v=4)](https://github.com/ricardoboss "ricardoboss (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![silencedis](https://avatars.githubusercontent.com/u/12890938?v=4)](https://github.com/silencedis "silencedis (1 commits)")[![someniatko](https://avatars.githubusercontent.com/u/15856706?v=4)](https://github.com/someniatko "someniatko (1 commits)")[![Mikulas](https://avatars.githubusercontent.com/u/192200?v=4)](https://github.com/Mikulas "Mikulas (1 commits)")[![Bilge](https://avatars.githubusercontent.com/u/470626?v=4)](https://github.com/Bilge "Bilge (1 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![jkuchar](https://avatars.githubusercontent.com/u/133822?v=4)](https://github.com/jkuchar "jkuchar (1 commits)")[![jules-iti](https://avatars.githubusercontent.com/u/36045067?v=4)](https://github.com/jules-iti "jules-iti (1 commits)")[![belfie13](https://avatars.githubusercontent.com/u/39270867?v=4)](https://github.com/belfie13 "belfie13 (1 commits)")[![Nebual](https://avatars.githubusercontent.com/u/1627867?v=4)](https://github.com/Nebual "Nebual (1 commits)")

---

Tags

polyfillphpdata structuresds

### Embed Badge

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

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

###  Alternatives

[phpxmlrpc/polyfill-xmlrpc

A pure-php reimplementation of the API exposed by the native XML-RPC extension

12369.8k2](/packages/phpxmlrpc-polyfill-xmlrpc)[roxblnfk/unpoly

Remove unnecessary PHP polyfills

4117.7k5](/packages/roxblnfk-unpoly)[judev/php-intervaltree

Interval Tree implementation in PHP

1138.8k1](/packages/judev-php-intervaltree)[ducks-project/spl-types

Polyfill Module for SplType PHP extension. This extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string

1032.4k](/packages/ducks-project-spl-types)

PHPackages © 2026

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