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

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

rafayrty/linkedlist-php
=======================

This Package allows you to have a Linked List inside Your PHP Project

00[2 PRs](https://github.com/rafayrty/linkedlist-php/pulls)PHP

Since Jul 3Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

PHP LinkedList
==============

[](#php-linkedlist)

A PHP Package Implementing Linked List, for the cases when it is actually costly to insert an element at the beginning of an array.

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

[](#installation)

You can install the package via composer:

```
composer require rafayrty/linkedlist-php
```

Usage
-----

[](#usage)

```
$list = new Rafayrty\LinkedListPhp\SinglyList();
//Insert a New Node to the LinkedList
$list->push(5); // -> returns the linkedlist

//Remove the Last Node from the LinkedList
$list->pop(); // -> returns value of deleted element

//Remove the Initial Node from the LinkedList
$list->shift(); // -> returns value of deleted node

//Add a Node To Beginning of the LinkedList
$list->unshift(5); // -> returns the linkedlist

//Get a Node from a specific index
$list->get(0); // -> returns the value of the node

//Remove a Node from a specific index
$list->remove(0); // -> returns the value of the deleted node

//Convert Your LinkedList to an array
$list->toArray(); // -> returns an array of linkedlist

//Delete an Element from a specified index to deleteCount similar to JS array splice
$list->splice($starting,$deletecount); // -> returns the linkedlist
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Abdul Rafay](https://github.com/rafayrty)

License
-------

[](#license)

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

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/382ea1d83a14b55088e3c6aad06653e7b9550d5053e337e7967ba358d55e4dfc?d=identicon)[rafayrty](/maintainers/rafayrty)

---

Top Contributors

[![rafayrty](https://avatars.githubusercontent.com/u/46190106?v=4)](https://github.com/rafayrty "rafayrty (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

### Embed Badge

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

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

###  Alternatives

[zakirullin/mess

Convenient array-related routine &amp; better type casting

21228.9k2](/packages/zakirullin-mess)[clarkwinkelmann/flarum-ext-emojionearea

Add EmojioneArea emoji picker to Flarum

2848.5k2](/packages/clarkwinkelmann-flarum-ext-emojionearea)[dcat-admin-extension/ueditor

百度在线编辑器

205.5k](/packages/dcat-admin-extension-ueditor)[shibuyakosuke/laravel-postalcode-japan

郵便番号データを取り込んで住所マスタを作成します。

105.2k](/packages/shibuyakosuke-laravel-postalcode-japan)

PHPackages © 2026

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