PHPackages                             fernleafsystems/zxcvbn-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. [Security](/categories/security)
4. /
5. fernleafsystems/zxcvbn-php

ActiveLibrary[Security](/categories/security)

fernleafsystems/zxcvbn-php
==========================

Realistic password strength estimation PHP library based on Zxcvbn JS

1.1.1(2y ago)14.0k↓49.7%1MITPHPPHP ^7.2 || ^8.0

Since Aug 1Pushed 2y agoCompare

[ Source](https://github.com/FernleafSystems/zxcvbn-php)[ Packagist](https://packagist.org/packages/fernleafsystems/zxcvbn-php)[ Docs](https://github.com/fernleafsystems/zxcvbn-php)[ RSS](/packages/fernleafsystems-zxcvbn-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

This is a simple fork of mkopinsky/zxcvbn-php to enable PHP 8 support by avoiding usage of the reserved `match` keyword.

Zxcvbn-PHP is a password strength estimator using pattern matching and minimum entropy calculation. Zxcvbn-PHP is based on the [the Javascript zxcvbn project](https://github.com/dropbox/zxcvbn) from [Dropbox and @lowe](https://tech.dropbox.com/2012/04/zxcvbn-realistic-password-strength-estimation/). "zxcvbn" is bad password, just like "qwerty" and "123456".

> zxcvbn attempts to give sound password advice through pattern matching and conservative entropy calculations. It finds 10k common passwords, common American names and surnames, common English words, and common patterns like dates, repeats (aaa), sequences (abcd), and QWERTY patterns.

[![Build Status](https://camo.githubusercontent.com/28c90711a070631dcf7b2ce1ac34195bf8f492ddccdd8438b7e3c310bfd9d53e/68747470733a2f2f7472617669732d63692e6f72672f6d6b6f70696e736b792f7a786376626e2d7068702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mkopinsky/zxcvbn-php)[![Coverage Status](https://camo.githubusercontent.com/a353767b911eecd31c57b36a25fd07dc24cc51818735bc80426fe7f514bf83fe/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d6b6f70696e736b792f7a786376626e2d7068702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/mkopinsky/zxcvbn-php?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/579367cd44930ea605e2ca62a970178af5250c6e4d4a63c42587e62abfedd6a7/68747470733a2f2f706f7365722e707567782e6f72672f6d6b6f70696e736b792f7a786376626e2d7068702f762f737461626c65)](https://packagist.org/packages/mkopinsky/zxcvbn-php)[![License](https://camo.githubusercontent.com/d03e63aae6fbf49a091e3fec012ca49b2854049add234607d6017a35b10eef97/68747470733a2f2f706f7365722e707567782e6f72672f6d6b6f70696e736b792f7a786376626e2d7068702f6c6963656e7365)](https://packagist.org/packages/mkopinsky/zxcvbn-php)

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

[](#installation)

The library can be installed with [Composer](http://getcomposer.org) by adding it as a dependency to your composer.json file.

```
{
    "require": {
        "fernleafsystems/zxcvbn-php": "^1.0"
    }
}
```

After running `php composer.phar update` on the command line, include the autoloader in your PHP scripts so that the ZxcvbnPhp class is available.

```
require_once 'vendor/autoload.php';
```

Usage
-----

[](#usage)

```
use ZxcvbnPhp\Zxcvbn;

$userData = [
  'Marco',
  'marco@example.com'
];

$zxcvbn = new Zxcvbn();
$strength = $zxcvbn->passwordStrength('password', $userData);
echo $strength['score'];
// will print 0

$strength = $zxcvbn->passwordStrength('correct horse battery staple');
echo $strength['score'];
// will print 4
```

### Acknowledgements

[](#acknowledgements)

Thanks to:

- @lowe for the original [Javascript Zxcvbn](https://github.com/lowe/zxcvbn)
- [@Dreyer's port](https://github.com/Dreyer/php-zxcvbn) for reference for initial implementation
- [bjeavon's implementation](https://github.com/bjeavons/zxcvbn-php) for building out zxcvbn-php as a solid initial port of the Dropbox library with composer support and unit tests

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~319 days

Total

4

Last Release

1048d ago

PHP version history (2 changes)1.0.0PHP ^5.6 || ^7.0

1.1.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/034fb67e76a9eef20cdb667c11b591a009dbece86d0c31fd7e84cc88fa03ee52?d=identicon)[paulgoodchild](/maintainers/paulgoodchild)

---

Top Contributors

[![clamburger](https://avatars.githubusercontent.com/u/1396298?v=4)](https://github.com/clamburger "clamburger (62 commits)")[![mkopinsky](https://avatars.githubusercontent.com/u/591435?v=4)](https://github.com/mkopinsky "mkopinsky (53 commits)")[![bjeavons](https://avatars.githubusercontent.com/u/94468?v=4)](https://github.com/bjeavons "bjeavons (41 commits)")[![paulgoodchild](https://avatars.githubusercontent.com/u/10562196?v=4)](https://github.com/paulgoodchild "paulgoodchild (13 commits)")[![texdc](https://avatars.githubusercontent.com/u/1590605?v=4)](https://github.com/texdc "texdc (8 commits)")[![paragonie-scott](https://avatars.githubusercontent.com/u/11591518?v=4)](https://github.com/paragonie-scott "paragonie-scott (2 commits)")[![PReimers](https://avatars.githubusercontent.com/u/1785288?v=4)](https://github.com/PReimers "PReimers (1 commits)")

---

Tags

passwordzxcvbn

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/fernleafsystems-zxcvbn-php/health.svg)

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

###  Alternatives

[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

87117.5M63](/packages/bjeavons-zxcvbn-php)[ircmaxell/password-compat

A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password\_hash

2.1k56.8M122](/packages/ircmaxell-password-compat)[symfony/password-hasher

Provides password hashing utilities

814137.2M91](/packages/symfony-password-hasher)[rych/phpass

PHP Password Library: Easy, secure password management for PHP

248801.7k4](/packages/rych-phpass)[mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

863.4M2](/packages/mikemclin-laravel-wp-password)[bordoni/phpass

Portable PHP password hashing framework

244.4M26](/packages/bordoni-phpass)

PHPackages © 2026

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