# Installation

HTML: [altophp.com/tree/installation](https://altophp.com/tree/installation/)

Alto Tree requires PHP 8.2 or later and the Mbstring extension.

```bash
composer require alto/tree
```

## Verify the installation

```php
<?php

require __DIR__.'/vendor/autoload.php';

use Alto\Tree\TreeBuilder;

$tree = TreeBuilder::fromPaths(['project/src/App.php'], 'project');

echo $tree->children['src']->children['App.php']->path;
```

The script prints `project/src/App.php`.

---

Previous: [Alto Tree](https://altophp.com/tree/index.md)
Next: [Getting started](https://altophp.com/tree/getting-started.md)

---

ALTO\TREE: [altophp.com/tree](https://altophp.com/tree/)
ALTO(PHP): [altophp.com](https://altophp.com/)
