PHPackages                             phaniso/autocomplete - 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. phaniso/autocomplete

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

phaniso/autocomplete
====================

v1.0(10y ago)0126[1 issues](https://github.com/phaniso/php-autocomplete/issues)GPL-2.0PHPPHP &gt;= 5.5.0

Since Feb 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/phaniso/php-autocomplete)[ Packagist](https://packagist.org/packages/phaniso/autocomplete)[ RSS](/packages/phaniso-autocomplete/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

php-autocomplete
================

[](#php-autocomplete)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a0f29a2d63e48baf9bf4d6a2b68df0aa549bd72f0f7b085f4d2f7a81b895fe42/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068616e69736f2f7068702d6175746f636f6d706c6574652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phaniso/php-autocomplete/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/1c8af9fff4d6f46f621f7798f18b8593519546974ce77f0c5f108919df4b77f0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7068616e69736f2f7068702d6175746f636f6d706c6574652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/phaniso/php-autocomplete?branch=master)[![Build Status](https://camo.githubusercontent.com/f6954f0c31e2ac2efd76d7bf22d1ccca4a8bc07a4e7366d821b33db4e3c4171b/68747470733a2f2f7472617669732d63692e6f72672f7068616e69736f2f7068702d6175746f636f6d706c6574652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phaniso/php-autocomplete)

Autocomplete PHP library that utilize trie data structure.

\###Installation

```
composer require phaniso/autocomplete

```

\###How to use

1. Build container

```
use Autocomplete\Factory\ContainerFactory;

$containerFactory = new ContainerFactory;
$trie = $containerFactory->build('Trie');

```

By default trie is case sensitive if you want to change it pass false as an argument

```
$trie = $containerFactory->build('Trie', [false]);

```

2.Add word

```
$trie->addWord('randomWord');

```

3.Get word(s) using prefix

```
$words = $trie->getByPrefix('random');

```

$words variable will now contain one element with 'randomWord' value

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

3767d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/127f6406d9dc56dde520bca7ab44795badc9d3e61ed19a95b9a07aae68722ad4?d=identicon)[phaniso](/maintainers/phaniso)

---

Top Contributors

[![mmalinowsky](https://avatars.githubusercontent.com/u/10564445?v=4)](https://github.com/mmalinowsky "mmalinowsky (17 commits)")[![Phaniso](https://avatars.githubusercontent.com/u/166827460?v=4)](https://github.com/Phaniso "Phaniso (5 commits)")

---

Tags

autocompletetrieprefix tree

### Embed Badge

![Health badge](/badges/phaniso-autocomplete/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k129.4M832](/packages/barryvdh-laravel-ide-helper)[jetbrains/phpstorm-stubs

PHP runtime &amp; extensions header files for PhpStorm

1.4k30.9M80](/packages/jetbrains-phpstorm-stubs)[twitter/typeahead.js

fast and fully-featured autocomplete library

16.5k213.4k4](/packages/twitter-typeaheadjs)[corejavascript/typeahead.js

fast and fully-featured autocomplete library

970107.4k2](/packages/corejavascript-typeaheadjs)[phalcon/ide-stubs

The most complete Phalcon Framework IDE stubs library which enables autocompletion in modern IDEs.

1643.2M128](/packages/phalcon-ide-stubs)[bazilio/yii2-stubs-generator

Yii2 component stubs generator for Yii::$app

146750.2k1](/packages/bazilio-yii2-stubs-generator)

PHPackages © 2026

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