WireRandom::string()
Generate a random string using given characters
Available since version 3.0.251.
Usage
// basic usage
$string = $wireRandom->string();
// usage with all arguments
$string = $wireRandom->string(int $length = 0, string $characters = '', array $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
$length (optional) | int | Length of string or specify 0 for random length |
$characters (optional) | string | Charaacters to use for random string or omit for partial ASCII set |
$options (optional) | array |
|
Return value
string
WireRandom methods and properties
API reference based on ProcessWire core version 3.0.251