final class Random

Secure random string generator.

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 27
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

Traits

Static class.