PHPackages                             phonetworks/pho-lib-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. phonetworks/pho-lib-graph

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

phonetworks/pho-lib-graph
=========================

A general purpose graph library in PHP

9.1.1(6y ago)556.2k4[2 issues](https://github.com/phonetworks/pho-lib-graph/issues)1MITPHPPHP &gt;=7.1CI failing

Since Apr 22Pushed 6y ago4 watchersCompare

[ Source](https://github.com/phonetworks/pho-lib-graph)[ Packagist](https://packagist.org/packages/phonetworks/pho-lib-graph)[ Docs](https://phonetworks.org)[ Fund](https://opencollective.com/risg)[ RSS](/packages/phonetworks-pho-lib-graph/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (9)Versions (107)Used By (1)

 [![](https://github.com/phonetworks/commons-php/raw/master/.github/cover-smaller.png)](https://github.com/phonetworks/commons-php/raw/master/.github/cover-smaller.png)

pho-lib-graph [![Build Status](https://camo.githubusercontent.com/e9b72b1b0efe794349b8edc55fa8f84fae134bb8b391771b37a1aeb96b37edb6/68747470733a2f2f7472617669732d63692e6f72672f70686f6e6574776f726b732f70686f2d6c69622d67726170682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phonetworks/pho-lib-graph)
=========================================================================================================================================================================================================================================================================================================================

[](#pho-lib-graph--)

A general purpose [graph](http://en.wikipedia.org/wiki/Graph_theory) library written in PHP 7.1+

Getting Started
---------------

[](#getting-started)

The recommended way to install pho-lib-graph is [through composer](https://getcomposer.org/).

```
composer require phonetworks/pho-lib-graph
```

Once you install, you can play with the library using the example application provided in the `playground` folder, named [bootstrap.php](https://github.com/phonetworks/pho-lib-graph/blob/master/playground/bootstrap.php)

Documentation
-------------

[](#documentation)

For more infomation on the internals of pho-lib-graph, as well as a simple user guide, please refer to the [docs/](https://github.com/phonetworks/pho-lib-graph/tree/master/docs) folder. You may also generate the APIs using phpdoc as described in [CONTRIBUTING.md](https://github.com/phonetworks/pho-lib-graph/blob/master/CONTRIBUTING.md)

FAQ
---

[](#faq)

**1. What is the difference between an edge and a predicate?**Predicate determines the characteristics of an edge. All edges must have a predicate, albeit defining the predicate explicitly is optional. If predicate is not defined, edges will be formed with a generic predicate.

**2. What is a binding predicate?**If a predicate is binding, should the edge's tail node is deleted, not only the edge itself gets stripped off, but the head node must be removed as well.

**3. What is an orphan edge?**An edge that does not have its head node (this edgelists for neither tail node nor head node are formed) is called an orphan edge. These are incomplete structures and programmers are not advised to use them. You can connect an orphan edge to its head with the `connect(NodeInterface $node)` method.

**4. What is a multiplicable predicate?**An edge with multiplicable predicate may be created multiple times between a particular pair of head and tail nodes.

License
-------

[](#license)

MIT, see [LICENSE](https://github.com/phonetworks/pho-lib-graph/blob/master/LICENSE).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~11 days

Recently: every ~45 days

Total

95

Last Release

2338d ago

Major Versions

4.1.0 → 5.0.02017-07-19

5.4.1 → 6.0.02017-09-02

6.5.0 → 7.0.02018-04-23

7.3.0 → 8.0.02018-09-08

8.1.2 → 9.0.02019-08-31

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

9.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3b6d80630289b910b490ff8998d30fd7a83e346ee6568e91c5df5eaae64d294?d=identicon)[esokullu](/maintainers/esokullu)

---

Top Contributors

[![esokullu](https://avatars.githubusercontent.com/u/19166?v=4)](https://github.com/esokullu "esokullu (298 commits)")[![groupsinc](https://avatars.githubusercontent.com/u/290835175?v=4)](https://github.com/groupsinc "groupsinc (33 commits)")

---

Tags

graphgraph-theoryphpphp-libraryphp7networknodegraphvertexedgepredicate

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/phonetworks-pho-lib-graph/health.svg)

```
[![Health](https://phpackages.com/badges/phonetworks-pho-lib-graph/health.svg)](https://phpackages.com/packages/phonetworks-pho-lib-graph)
```

###  Alternatives

[clue/graph

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

7154.6M45](/packages/clue-graph)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[graphp/graph

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

715319.0k5](/packages/graphp-graph)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

568591.1k62](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k52](/packages/civicrm-civicrm-core)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.4M234](/packages/illuminate-broadcasting)

PHPackages © 2026

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