16 $strength = 0;
17
18 /*** get the length of the password ***/
19 $length = strlen($password);
20
21 /*** check if password is not all lower case ***/
22 if(strtolower($password) != $password)
23 {
24 $strength += 1;
25 }
26
27 /*** check if password is not all upper case ***/
28 if(strtoupper($password) == $password)
29 {
30 $strength += 1;
31 }
32
33 /*** check string length is 8 -15 chars ***/
34 if($length >= 8 && $length <= 15)
35 {
36 $strength += 1;
37 }