PHPackages                             mathalubos/sorted-linked-list - 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. mathalubos/sorted-linked-list

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

mathalubos/sorted-linked-list
=============================

A sorted linked list implementation in PHP.

1.0.1(11mo ago)03[1 PRs](https://github.com/mathalubos/sorted-linked-list/pulls)MITPHPPHP ^8.2

Since Jun 12Pushed 10mo agoCompare

[ Source](https://github.com/mathalubos/sorted-linked-list)[ Packagist](https://packagist.org/packages/mathalubos/sorted-linked-list)[ RSS](/packages/mathalubos-sorted-linked-list/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

Sorted linked list
==================

[](#sorted-linked-list)

A sorted linked list implementation in PHP with support for int and string elements and customizable sort order defaulting to ASC.

Installation
------------

[](#installation)

```
composer require mathalubos/sorted-linked-list

```

Usage
-----

[](#usage)

```
use Mathalubos\SortedLinkedList\Enum\SortEnum;
use Mathalubos\SortedLinkedList\IntSortedLinkedList;

$sortedLinkedList = new IntSortedLinkedList(SortEnum::ASC);
$sortedLinkedList->add(5);
$sortedLinkedList->add(3);
$sortedLinkedList->add(7);

foreach ($sortedLinkedList as $item) {
    echo $item;
}

// outputs: 3, 5, 7
```

Coding standards
----------------

[](#coding-standards)

- To check coding standards, run commands:
- `./vendor/bin/php-cs-fixer fix`
- `./vendor/bin/phpstan analyse`

Tests
-----

[](#tests)

- To run all tests execute:
- `./vendor/bin/phpunit tests`

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance53

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

337d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36f56eb5420dd7292ea4b6529a672a1f70738e089635ad7f21e477bdfef3a8d2?d=identicon)[mathalubos](/maintainers/mathalubos)

---

Top Contributors

[![mathalubos](https://avatars.githubusercontent.com/u/13135394?v=4)](https://github.com/mathalubos "mathalubos (4 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mathalubos-sorted-linked-list/health.svg)

```
[![Health](https://phpackages.com/badges/mathalubos-sorted-linked-list/health.svg)](https://phpackages.com/packages/mathalubos-sorted-linked-list)
```

###  Alternatives

[wire-elements/wire-extender

Embed your Livewire components anywhere.

28133.9k1](/packages/wire-elements-wire-extender)

PHPackages © 2026

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