Random
in package
uses
StaticClass
FinalYes
Secure random string generator.
Table of Contents
Methods
- __callStatic() : mixed
- Call to undefined static method.
- 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
__callStatic()
Call to undefined static method.
public
static __callStatic(string $name, array<string|int, mixed> $args) : mixed
Parameters
- $name : string
- $args : array<string|int, mixed>
Tags
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