PHPackages                             wyndow/fuzzywuzzy - 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. wyndow/fuzzywuzzy

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

wyndow/fuzzywuzzy
=================

Fuzzy string matching based on FuzzyWuzzy from Seatgeek

v0.6.0(9y ago)742.0M—3.9%31[6 issues](https://github.com/wyndow/fuzzywuzzy/issues)[1 PRs](https://github.com/wyndow/fuzzywuzzy/pulls)6MITPHPPHP &gt;=5.4

Since Apr 25Pushed 1y ago7 watchersCompare

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

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

FuzzyWuzzy
==========

[](#fuzzywuzzy)

[![Build Status](https://camo.githubusercontent.com/08ed6261ddee754a5f99917e3a97a509daf199ce506804b480b63becddeb86ae/68747470733a2f2f7472617669732d63692e6f72672f77796e646f772f66757a7a7977757a7a792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wyndow/fuzzywuzzy)

Fuzzy string matching for PHP, based on the [python library](https://github.com/seatgeek/fuzzywuzzy) of the same name.

Requirements
------------

[](#requirements)

- PHP 5.4 or higher

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

[](#installation)

Using [Composer](http://getcomposer.org/)

```
composer require wyndow/fuzzywuzzy

```

Usage
-----

[](#usage)

```
use FuzzyWuzzy\Fuzz;
use FuzzyWuzzy\Process;

$fuzz = new Fuzz();
$process = new Process($fuzz); // $fuzz is optional here, and can be omitted.
```

### Simple Ratio

[](#simple-ratio)

```
>>> $fuzz->ratio('this is a test', 'this is a test!')
=> 96
```

### Partial Ratio

[](#partial-ratio)

```
>>> $fuzz->partialRatio('this is a test', 'this is a test!')
=> 100
```

### Token Sort Ratio

[](#token-sort-ratio)

```
>>> $fuzz->ratio('fuzzy wuzzy was a bear', 'wuzzy fuzzy was a bear')
=> 90
>>> $fuzz->tokenSortRatio('fuzzy wuzzy was a bear', 'wuzzy fuzzy was a bear')
=> 100
```

### Token Set Ratio

[](#token-set-ratio)

```
>>> $fuzz->tokenSortRatio('fuzzy was a bear', 'fuzzy fuzzy was a bear')
=> 84
>>> $fuzz->tokenSetRatio('fuzzy was a bear', 'fuzzy fuzzy was a bear')
=> 100
```

### Process

[](#process)

```
>>> $choices = ['Atlanta Falcons', 'New York Jets', 'New York Giants', 'Dallas Cowboys']
>>> $c = $process->extract('new york jets', $choices, null, null, 2)
=> FuzzyWuzzy\Collection {#205}
>>> $c->toArray()
=> [
     [
       "New York Jets",
       100,
     ],
     [
       "New York Giants",
       78,
     ],
   ]
>>> $process->extractOne('cowboys', $choices)
=> [
     "Dallas Cowboys",
     90,
   ]
```

You can also pass additional parameters to `extractOne` to make it use a specific scorer.

```
>>> $process->extractOne('cowbell', $choices, null, [$fuzz, 'ratio'])
=> [
     "Dallas Cowboys",
     38,
   ]
>>> $process->extractOne('cowbell', $choices, null, [$fuzz, 'tokenSetRatio'])
=> [
     "Dallas Cowboys",
     57,
   ]
```

Caveats
-------

[](#caveats)

Unicode strings may produce unexpected results. We intend to correct this in future versions.

Further Reading
---------------

[](#further-reading)

- [Fuzzy String Matching in Python](http://chairnerd.seatgeek.com/fuzzywuzzy-fuzzy-string-matching-in-python/)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity56

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity48

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

3310d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ef52ce0a4d546c303cbf41b8003f68daed00f492bdb75e514cfba859df02621?d=identicon)[mcrumm](/maintainers/mcrumm)

---

Top Contributors

[![mcrumm](https://avatars.githubusercontent.com/u/168677?v=4)](https://github.com/mcrumm "mcrumm (3 commits)")

---

Tags

fuzzy-matchingfuzzywuzzyphp-librarystring-distancestring-matching

### Embed Badge

![Health badge](/badges/wyndow-fuzzywuzzy/health.svg)

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

###  Alternatives

[daverandom/libdns

DNS protocol implementation written in pure PHP

16339.1M9](/packages/daverandom-libdns)

PHPackages © 2026

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