str_shuffle example

$password = '';

        foreach ($sets as $set) {
            $password .= self::getRandomArrayElement(str_split($set));
            $pool .= $set;
        }

        $pool = str_split($pool);
        for ($i = 0; $i < $length - \count($sets); ++$i) {
            $password .= self::getRandomArrayElement($pool);
        }
        $password = str_shuffle($password);

        return $password;
    }

    /** * Return a random element from an array * * @param array $array */
    public static function getRandomArrayElement($array)
    {
        
Home | Imprint | This part of the site doesn't use cookies.