PHPackages                             lucascavalcante/fuzzy-search - 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. [Search &amp; Filtering](/categories/search)
4. /
5. lucascavalcante/fuzzy-search

ActiveLibrary[Search &amp; Filtering](/categories/search)

lucascavalcante/fuzzy-search
============================

A PHP library that turns easy fuzzy string searching

v1.0.1(6y ago)72.2k↓11.1%3[5 issues](https://github.com/lucascavalcante/fuzzy-search/issues)MITPHPPHP &gt;= 7.0

Since Jun 27Pushed 4y agoCompare

[ Source](https://github.com/lucascavalcante/fuzzy-search)[ Packagist](https://packagist.org/packages/lucascavalcante/fuzzy-search)[ RSS](/packages/lucascavalcante-fuzzy-search/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Fuzzy Search
============

[](#fuzzy-search)

A PHP library that turns easy fuzzy string searching

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

[](#installation)

`composer require lucascavalcante/fuzzy-search`

Use
---

[](#use)

Given an array

```
$series = [
    ['title' => 'Grey\'s Anatomy', 'releaseYear' => '2016'],
    ['title' => 'Prison Break', 'releaseYear' => '2008'],
    ['title' => 'How I Met Your Mother', 'releaseYear' => '2014'],
    ['title' => 'Supernatural', 'releaseYear' => '2016'],
    ['title' => 'Breaking Bad', 'releaseYear' => '2013'],
    ['title' => 'The Vampire Diaries', 'releaseYear' => '2017'],
    ['title' => 'The Walking Dead', 'releaseYear' => '2015'],
    ['title' => 'Pretty Little Liars', 'releaseYear' => '2016'],
    ['title' => 'Once Upon a Time', 'releaseYear' => '2016'],
    ['title' => 'Sherlock', 'releaseYear' => '2016'],
    ['title' => 'Death Note', 'releaseYear' => '2006'],
    ['title' => 'Lottie Dottie Chicken', 'releaseYear' => '2009'],
    ['title' => 'Black Mirror', 'releaseYear' => '2016'],
    ['title' => 'The 100', 'releaseYear' => '2016'],
    ['title' => 'Marvel\'s Luke Cage', 'releaseYear' => '2016'],
    ['title' => 'Marvel\'s Iron Fist', 'releaseYear' => '2017'],
    ['title' => 'Narcos', 'releaseYear' => '2016'],
    ['title' => '3%', 'releaseYear' => '2016'],
    ['title' => 'Sex, Love and Therapy', 'releaseYear' => '2014'],
    ['title' => 'White Girl', 'releaseYear' => '2016'],
    ['title' => 'Girlboss', 'releaseYear' => '2017'],
    ['title' => 'City of God: 10 Years Later', 'releaseYear' => '2013'],
    ['title' => '13 Reasons Why', 'releaseYear' => '2017'],
    ['title' => '90210', 'releaseYear' => '2013'],
    ['title' => 'Gossip Girl', 'releaseYear' => '2012'],
    ['title' => 'Bates Motel', 'releaseYear' => '2016'],
    ['title' => '30 Rock', 'releaseYear' => '2012'],
];
```

Create a new object

```
use FuzzySearch\FuzzySearch;

$keyToBeSearched = 'title'
$fuzzy = new FuzzySearch($series, $keyToBeSearched);
```

Doing the search

```
$term = 'the hundred';
$maxDistance = 4;
print_r($fuzzy->search($term, $maxDistance));
```

Result

```
Array
(
    [0] => Array
        (
            [title] => The 100
            [releaseYear] => 2016
            [distance] => 0
        )

)

```

License
-------

[](#license)

This project is licensed under the MIT license.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance6

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~0 days

Total

2

Last Release

2517d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4119259?v=4)[Lucas](/maintainers/lucascavalcante)[@lucascavalcante](https://github.com/lucascavalcante)

---

Top Contributors

[![lucascavalcante](https://avatars.githubusercontent.com/u/4119259?v=4)](https://github.com/lucascavalcante "lucascavalcante (10 commits)")[![matheusbloise](https://avatars.githubusercontent.com/u/46876171?v=4)](https://github.com/matheusbloise "matheusbloise (1 commits)")

---

Tags

hacktoberfesthacktoberfest2021packagistphpsearchstringmatchingfuzzysearching

### Embed Badge

![Health badge](/badges/lucascavalcante-fuzzy-search/health.svg)

```
[![Health](https://phpackages.com/badges/lucascavalcante-fuzzy-search/health.svg)](https://phpackages.com/packages/lucascavalcante-fuzzy-search)
```

###  Alternatives

[ilya/fuzzy

Nice PHP library for fuzzy string searching

4298.7k](/packages/ilya-fuzzy)[jackpopp/geodistance

Search for locations within a radius using latitude and longitude values with your eloquent models.

125120.4k13](/packages/jackpopp-geodistance)[mihanentalpo/fast-fuzzy-search

Fast fuzzy search in an array of strings for the most similiar ones

2133.0k3](/packages/mihanentalpo-fast-fuzzy-search)

PHPackages © 2026

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