PHPackages                             mkopinsky/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. mkopinsky/zxcvbn-php

AbandonedArchivedLibrary[Security](/categories/security)

mkopinsky/zxcvbn-php
====================

Realistic password strength estimation PHP library based on Zxcvbn JS

4.4.2(7y ago)23496.0k↓26.3%9[1 issues](https://github.com/mkopinsky/zxcvbn-php/issues)1MITPHPPHP ^5.6 || ^7.0

Since Apr 7Pushed 7y ago2 watchersCompare

[ Source](https://github.com/mkopinsky/zxcvbn-php)[ Packagist](https://packagist.org/packages/mkopinsky/zxcvbn-php)[ Docs](https://github.com/mkopinsky/zxcvbn-php)[ RSS](/packages/mkopinsky-zxcvbn-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (10)Used By (1)

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": {
        "mkopinsky/zxcvbn-php": "^4.4.2"
    }
}
```

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

40

—

FairBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity64

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

Recently: every ~389 days

Total

8

Last Release

2849d ago

Major Versions

0.3.0 → 4.4.22018-09-14

PHP version history (3 changes)0.1.0PHP &gt;=5.3.0

0.2.0PHP ^5.3 || ^7.0

4.4.2PHP ^5.6 || ^7.0

### Community

Maintainers

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

---

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)")[![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/mkopinsky-zxcvbn-php/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B13.9k](/packages/symfony-console)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/http-foundation

Defines an object-oriented layer for the HTTP specification

8.7k928.6M6.5k](/packages/symfony-http-foundation)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

87219.2M85](/packages/bjeavons-zxcvbn-php)

PHPackages © 2026

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