PHPackages                             belniakmedia/hunspell-php - 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. belniakmedia/hunspell-php

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

belniakmedia/hunspell-php
=========================

Hunspell PHP wrapper

4.0.2(3mo ago)061MITPHPPHP &gt;=8.0

Since Aug 18Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/BelniakMedia/HunspellPHP)[ Packagist](https://packagist.org/packages/belniakmedia/hunspell-php)[ RSS](/packages/belniakmedia-hunspell-php/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (9)Used By (0)

Hunspell PHP wrapper
====================

[](#hunspell-php-wrapper)

Forked from [johnzuk/HunspellPHP](https://github.com/johnzuk/HunspellPHP)

### Version 4.x (Optimization +Batch Mode)

[](#version-4x-optimization-batch-mode)

This version changes find() and possibly stem() (I'm not exactly sure how stem() functioned before as I did not use it, but I updated to be compatible with the changes made under the hood to `hunspellSuggest()`). The changes to `hunspellSuggest()` can now take a space-separated string of words to batch process. This change allows a single process call to handle many spell checks (and stems) rather than having to invoke the process once for each word. The update also ensures the 1000ms timeout "deadline" is not forcing the process to wait that time before ending which appeared to be the case in previous versions.

### Version 3.0.0 (Very minor backward breaking change)

[](#version-300-very-minor-backward-breaking-change)

This version updates the constructor signature with a different (better?) default value for `$encoding`, so if anyone was using that this would be a backward breaking change. Otherwise, a new constructor argument $custom\_word\_file (path) has been added and will bind your provided custom word list with your dictionary in real time.

The other change this version takes care of is using `proc_open` and better env/encoding handling in general. We also now emmit an `error_log()` call so stderr output from the hunspell process are logged properly.

### Version 2.x

[](#version-2x)

Version 2.0.0 and above requires PHP ^8.0.0 and includes an important fix to the result matcher regex. If you need this for an older version of PHP I recommend that you fork 1.2 and update the regex matcher property of the Hunspell class to what is set in the current version of the code.

[View Changelog](CHANGELOG.md)

### The reason for this fork

[](#the-reason-for-this-fork)

This project was initially forked because the shell commands used were for a non-bash shell. This fork's main purpose was to convert the shell commands to a BASH compatible syntax and add support for Windows powershell. As such this fork will not work correctly outside of a bash or powershell environment.

An additional change was made to the parsing of the return value as the `PHP_EOL` value used in the original source was not working in my testing. This was changed to "\\n" which resolved the issue.

Example
=======

[](#example)

```
$hunspell = new \HunspellPHP\Hunspell();
var_dump($hunspell->find('otwórz'));
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance82

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% 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 ~493 days

Recently: every ~271 days

Total

8

Last Release

94d ago

Major Versions

1.2 → 2.0.02023-02-16

2.0.0 → 3.0.02025-10-30

3.0.0 → 4.0.02026-01-30

PHP version history (2 changes)v1.0PHP &gt;=5.6

2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebaede952a8bd243632f06aee5b30c529503a33ad07ddb59941f9c45898c883a?d=identicon)[RickKukiela](/maintainers/RickKukiela)

---

Top Contributors

[![RickKukiela](https://avatars.githubusercontent.com/u/3813238?v=4)](https://github.com/RickKukiela "RickKukiela (9 commits)")[![Bartheyrman22](https://avatars.githubusercontent.com/u/12160269?v=4)](https://github.com/Bartheyrman22 "Bartheyrman22 (2 commits)")

### Embed Badge

![Health badge](/badges/belniakmedia-hunspell-php/health.svg)

```
[![Health](https://phpackages.com/badges/belniakmedia-hunspell-php/health.svg)](https://phpackages.com/packages/belniakmedia-hunspell-php)
```

###  Alternatives

[qinchen/web-utils

A web application common utils

111.4k](/packages/qinchen-web-utils)

PHPackages © 2026

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