Random
in package
uses
StaticClass
FinalYes
Secure random string generator.
Table of Contents
Methods
- generate() : string
- Generates a random string of given length from characters specified in second argument.
- __construct() : mixed
- Class is static and cannot be instantiated.
Methods
generate()
Generates a random string of given length from characters specified in second argument.
public
static generate([int $length = 10 ][, string $charlist = '0-9a-z' ]) : string
Supports intervals, such as 0-9 or A-Z.
Parameters
- $length : int = 10
- $charlist : string = '0-9a-z'
Return values
string__construct()
Class is static and cannot be instantiated.
private
__construct() : mixed