PHP code example of fernleafsystems / zxcvbn-php
1. Go to this page and download the library: Download fernleafsystems/zxcvbn-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fernleafsystems / zxcvbn-php example snippets
use ZxcvbnPhp\Zxcvbn;
$userData = [
'Marco',
'[email protected]'
];
$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