class Random

Secure random string generator.

Traits

Static class.

Methods

static string
generate(int $length = 10, string $charlist = '0-9a-z')

Generates a random string of given length from characters specified in second argument.

Details

at line 26
static string generate(int $length = 10, string $charlist = '0-9a-z')

Generates a random string of given length from characters specified in second argument.

Supports intervals, such as 0-9 or A-Z.

Parameters

int $length
string $charlist

Return Value

string