public static function analyze($password)
	{
		$stats = array();

		$len = strlen($password);

		$stats['count'][0] = $len;
		$stats['uniqueCharacters'] = 0;
		$stats['uniqueClasses']    = 0;

		$classes   = array();
		$histogram = array();

		for ($i = 0; $i < $len; $i++)
		{
			$c = $password[$i];

			$cl = CharacterClass::match($c);

			foreach ($cl as $class)
			{
				if (empty($stats['count'][$class->name]))
				{
					$stats['count'][$class->name] = 1;
					if ($class->flag)
					{
						$stats['uniqueClasses']++;
					}
				}
				else
				{
					$stats['count'][$class->name]++;
				}
			}

			if (empty($histogram[$c]))
			{
				$histogram[$c] = 1;
				$stats['uniqueCharacters']++;
			}
			else
			{
				$histogram[$c]++;
			}
		}

		return $stats;
	}
public static function analyze($password)
	{
		$stats = array();

		$len = strlen($password);

		$stats['count'][0] = $len;
		$stats['uniqueCharacters'] = 0;
		$stats['uniqueClasses']    = 0;

		$classes   = array();
		$histogram = array();

		for ($i = 0; $i < $len; $i++)
		{
			$c = $password[$i];

			$cl = CharacterClass::match($c);

			foreach ($cl as $class)
			{
				if (empty($stats['count'][$class->name]))
				{
					$stats['count'][$class->name] = 1;
					if ($class->flag)
					{
						$stats['uniqueClasses']++;
					}
				}
				else
				{
					$stats['count'][$class->name]++;
				}
			}

			if (empty($histogram[$c]))
			{
				$histogram[$c] = 1;
				$stats['uniqueCharacters']++;
			}
			else
			{
				$histogram[$c]++;
			}
		}

		return $stats;
	}
public static function analyze ( $ password ) { $ stats = array ( ) ; $ len = strlen ( $ password ) ; $ stats [ 'count' ] [ 0 ] = $ len ; $ stats [ 'uniqueCharacters' ] = 0 ; $ stats [ 'uniqueClasses' ] = 0 ; $ classes = array ( ) ; $ histogram = array ( ) ; for ( $ i = 0 ; $ i < $ len ; $ i ++ ) { $ c = $ password [ $ i ] ; $ cl = CharacterClass :: match ( $ c ) ; foreach ( $ cl as $ class ) { if ( empty ( $ stats [ 'count' ] [ $ class -> name ] ) ) { $ stats [ 'count' ] [ $ class -> name ] = 1 ; if ( $ class -> flag ) { $ stats [ 'uniqueClasses' ] ++ ; } } else { $ stats [ 'count' ] [ $ class -> name ] ++ ; } } if ( empty ( $ histogram [ $ c ] ) ) { $ histogram [ $ c ] = 1 ; $ stats [ 'uniqueCharacters' ] ++ ; } else { $ histogram [ $ c ] ++ ; } } return $ stats ; }
Analyze a password

@param   string  $password
@return  array
Analyze a password