PHPackages                             graphp/graph - 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/graph

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

graphp/graph
============

GraPHP is the mathematical graph/network library written in PHP.

v0.9.3(4y ago)711292.6k—6.3%743MITPHPPHP &gt;=5.3

Since May 7Pushed 3y ago29 watchersCompare

[ Source](https://github.com/graphp/graph)[ Packagist](https://packagist.org/packages/graphp/graph)[ Docs](https://github.com/graphp/graph)[ Fund](https://clue.engineering/support)[ GitHub Sponsors](https://github.com/clue)[ RSS](/packages/graphp-graph/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (11)Used By (3)

graphp/graph
============

[](#graphpgraph)

[![CI status](https://github.com/graphp/graph/actions/workflows/ci.yml/badge.svg)](https://github.com/graphp/graph/actions)[![development installs on Packagist](https://camo.githubusercontent.com/e1c29824e4a27c940cefd52f9845d39bea03b4371991e6a38035e083348ed329/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772617068702f67726170683f636f6c6f723d626c7565266c6162656c3d646576656c6f706d656e74253230696e7374616c6c732532306f6e2532305061636b6167697374)](https://packagist.org/packages/graphp/graph)[![previous installs on Packagist](https://camo.githubusercontent.com/18b4d45ea064983eca6c0b85eab220a297e0384c281c2f02b9c2c46891335e49/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c75652f67726170683f636f6c6f723d626c7565266c6162656c3d70726576696f7573253230696e7374616c6c732532306f6e2532305061636b6167697374)](https://packagist.org/packages/clue/graph)

GraPHP is the mathematical graph/network library written in PHP.

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

**Table of contents**

- [Quickstart examples](#quickstart-examples)
- [Features](#features)
- [Components](#components)
    - [Graph drawing](#graph-drawing)
    - [Common algorithms](#common-algorithms)
- [Install](#install)
- [Tests](#tests)
- [Contributing](#contributing)
- [License](#license)

Quickstart examples
-------------------

[](#quickstart-examples)

Once [installed](#install), let's initialize a sample graph:

```
