PHPackages                             angle/tree - 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. angle/tree

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

angle/tree
==========

Basic binary tree implementation in PHP.

v1.0.0(7y ago)1101MITPHPPHP ^7.0

Since Mar 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/anglesoft/tree)[ Packagist](https://packagist.org/packages/angle/tree)[ RSS](/packages/angle-tree/feed)WikiDiscussions master Synced 2mo ago

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

🌳 Tree
======

[](#-tree)

Simple binary tree implementation in PHP.

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

[](#installation)

```
composer require angle/tree
```

Usage
-----

[](#usage)

Creating a tree:

```
use Angle\Tree\Leaf;

$tree = new Leaf(10);
$tree->insert(5);
$tree->insert(15);
$tree->insert(8);
```

Check for values within the tree:

```
$tree->contains(5); // true
$tree->contains(42); // false
```

Climb the tree:

```
$tree->left->right->data == 8; // true
```

Contributing
------------

[](#contributing)

Improvements are welcome! Feel free to submit pull requests.

Licence
-------

[](#licence)

MIT

Copyright © 2019 [Angle Software](https://angle.software)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2616d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/326010a666d65d1a1438c5d1aabc95173b191502dae6f92380924749a9100541?d=identicon)[angle](/maintainers/angle)

---

Top Contributors

[![benvilliere](https://avatars.githubusercontent.com/u/22590566?v=4)](https://github.com/benvilliere "benvilliere (7 commits)")

---

Tags

data-structures-algorithmsphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/angle-tree/health.svg)

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

PHPackages © 2026

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