PHPackages                             graphp/algorithms - 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. graphp/algorithms

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

graphp/algorithms
=================

Common mathematical graph algorithms implemented in PHP

v0.8.2(6y ago)1392.9M↓55.1%27[14 issues](https://github.com/graphp/algorithms/issues)[2 PRs](https://github.com/graphp/algorithms/pulls)14MITPHPPHP &gt;=5.3CI failing

Since Feb 25Pushed 3y ago7 watchersCompare

[ Source](https://github.com/graphp/algorithms)[ Packagist](https://packagist.org/packages/graphp/algorithms)[ Docs](https://github.com/graphp/algorithms)[ RSS](/packages/graphp-algorithms/feed)WikiDiscussions 0.9.x Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (14)

graphp/algorithms
=================

[](#graphpalgorithms)

[![CI status](https://github.com/graphp/algorithms/workflows/CI/badge.svg)](https://github.com/graphp/algorithms/actions)

Common mathematical graph algorithms implemented in PHP

> **Development version:** This branch contains the code for the upcoming version 0.9. For the code of the current version 0.8, check out the [`0.8.x` branch](https://github.com/graphp/algorithms/tree/0.8.x).
>
> The upcoming version 0.9 will be the way forward for this package. However, we will still actively support version 0.8 for those not yet on the latest version. See also [installation instructions](#install) for more details.

Install
-------

[](#install)

The recommended way to install this library is [through Composer](https://getcomposer.org/). [New to Composer?](https://getcomposer.org/doc/00-intro.md)

Once released, this project will follow [SemVer](https://semver.org/). At the moment, this will install the latest development version:

```
composer require graphp/algorithms:^0.9@dev
```

See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.

This project aims to run on any platform and thus does not require any PHP extensions and supports running on legacy PHP 5.3 through current PHP 7+. It's *highly recommended to use PHP 7+* for this project.

Tests
-----

[](#tests)

To run the test suite, you first need to clone this repo and then install all dependencies [through Composer](https://getcomposer.org/):

```
composer install
```

To run the test suite, go to the project root and run:

```
vendor/bin/phpunit
```

License
-------

[](#license)

This project is released under the permissive [MIT license](LICENSE).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity58

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.6% 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 ~701 days

Total

5

Last Release

1315d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/776829?v=4)[Christian Lück](/maintainers/clue)[@clue](https://github.com/clue)

---

Top Contributors

[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (368 commits)")[![tobiasneumann](https://avatars.githubusercontent.com/u/1560727?v=4)](https://github.com/tobiasneumann "tobiasneumann (55 commits)")[![Flos](https://avatars.githubusercontent.com/u/1560705?v=4)](https://github.com/Flos "Flos (17 commits)")[![SimonFrings](https://avatars.githubusercontent.com/u/44357440?v=4)](https://github.com/SimonFrings "SimonFrings (7 commits)")[![phyrwork](https://avatars.githubusercontent.com/u/3750242?v=4)](https://github.com/phyrwork "phyrwork (2 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![drowe-wayfair](https://avatars.githubusercontent.com/u/126295987?v=4)](https://github.com/drowe-wayfair "drowe-wayfair (1 commits)")

---

Tags

shortest pathdijkstraGraph algorithmsmoore-bellman-fordminimum spanning treekruskalprim

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/graphp-algorithms/health.svg)

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

###  Alternatives

[graphp/graphviz

GraphViz graph drawing for the mathematical graph/network library GraPHP.

3292.2M53](/packages/graphp-graphviz)[letournel/path-finder

Path finder algorithm

142.0k](/packages/letournel-path-finder)[fisharebest/algorithm

Implementation of standard algorithms in PHP.

71102.3k2](/packages/fisharebest-algorithm)[graphp/graphml

GraphML is an XML-based file format for graphs

286.7k1](/packages/graphp-graphml)[bmichotte/dijkstra

php 7+ implementation of the Dijkstra algorithm

131.5k](/packages/bmichotte-dijkstra)[daveawb/understated

A PHP Finite State Machine for Laravel 5+

302.0k](/packages/daveawb-understated)

PHPackages © 2026

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