PHP code example of universiterennes2 / standfordlikepasswordpolicy

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

    

universiterennes2 / standfordlikepasswordpolicy example snippets



UniversiteRennes2\StandfordLikePasswordPolicy\StandfordLikePasswordPolicy;

$passwordPolicy = new StandfordLikePasswordPolicy();

$password = 'not compliant';

if ( $passwordPolicy->isCompliant($password) ) {
    // Compliant password
    echo "Compliant\n";
} else {
    // Not compliant !
    echo "Not compliant\n";
}