PHP 8.4.24 Released!

Voting

: max(one, zero)?
(Example: nine)

The Note You're Voting On

darek at module17 dot com
13 years ago
Simple password generation function using sprintf and the %c type specifier; which is the same as chr().

function genPass($len = 8) {
    for ($i=0;$i<=$len;$i++) {
        $passwd = sprintf('%s%c', isset($passwd) ? $passwd : NULL, rand(48, 122));
    }
    return $passwd;
}

<< Back to user notes page

To Top