PHPackages                             neoxium/php-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. neoxium/php-graph

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

neoxium/php-graph
=================

Implementation of graph data structures in PHP

v1.0.1(5mo ago)02[1 PRs](https://github.com/neoxium/php-graph/pulls)MITPHPPHP ^8.4CI passing

Since Jan 20Pushed 2mo agoCompare

[ Source](https://github.com/neoxium/php-graph)[ Packagist](https://packagist.org/packages/neoxium/php-graph)[ RSS](/packages/neoxium-php-graph/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

PHP Graph Library
=================

[](#php-graph-library)

A lightweight PHP 8.4 library to handle graph data structures. No external dependencies.

🚀 Features
----------

[](#-features)

- **Complete Data Structure:** Directed and undirected graphs
- **Traversal Algorithms:** DFS, BFS
- **Pathfinding:** Dijkstra, cycle detection
- **Serialization:** Export/Import to Array and JSON
- **Unit Testing:** Integrated testing framework
- **PHP 8.4:** Uses the latest features (read-only, strict types)

🔧 Installation
--------------

[](#-installation)

### Composer

[](#composer)

Install with Composer

```
composer require neoxium/php-graph
```

### Download [Latest release](https://github.com/neoxium/php-graph/releases/latest)

[](#download-latest-release)

No dependencies are required, apart from PHPUnit for testing purpose. Simply clone or copy the files into your project.

```
# Clone or copy files
# Make sure you have PHP 8.4+ installed
php --version
```

💡 Usage
-------

[](#-usage)

### Basic example

[](#basic-example)

```
