PHP code example of niirrty / niirrty.security.password

1. Go to this page and download the library: Download niirrty/niirrty.security.password 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/ */

    

niirrty / niirrty.security.password example snippets


# use \Niirrty\Security\Password\PasswordSecurityCheck;

$passwords = [
   '',
   '0',
   '1',
   '22',
   'aaa',
   'aaaa',
   'AAAAA',
   '123456',
   '_______',
   'gEhe1m',
   '$4QT5/_8',
   '123456789'
];

foreach ( $passwords as $password )
{
   echo $password, ': ', ( new PasswordSecurityCheck( $password ) )->getQuality(), "\n";
}