WireRandom::integer()
Get a random integer
Usage
// basic usage
$int = $wireRandom->integer();
// usage with all arguments
$int = $wireRandom->integer(int $min = 0, int $max = 9223372036854775807, array $options = []);Arguments
| Name | Type(s) | Description |
|---|---|---|
$min (optional) | int | Minimum allowed value Default:0 |
$max (optional) | int | Maximum allowed value Default:PHP_INT_MAX |
$options (optional) | array |
|
Return value
int arrayReturns integer, or will return array if $info option specified.
Exceptions
Method can throw exceptions on error:
WireException
WireRandom methods and properties
API reference based on ProcessWire core version 3.0.253