RandomizationHelper
in package
Randomization helper
Table of Contents
Methods
- Character() : string
- Generates a random string of characters with the specified length.
- Integer() : int
- Generates a random integer within the specified range.
- Mixed() : string
- Returns a randomly generated string of mixed characters with the specified length.
- Numeric() : string
- Generates a random string of the specified length, consisting of numeric digits.
- Seed() : int
- Generates a random seed value.
Methods
Character()
Generates a random string of characters with the specified length.
public
static Character(int $length) : string
Parameters
- $length : int
-
The desired length of the random string.
Return values
string —The randomly generated string of characters.
Integer()
Generates a random integer within the specified range.
public
static Integer(int $min, int $max) : int
Parameters
- $min : int
-
The minimum value (inclusive).
- $max : int
-
The maximum value (inclusive).
Return values
int —A randomly generated integer between $min and $max.
Mixed()
Returns a randomly generated string of mixed characters with the specified length.
public
static Mixed(int $length) : string
Parameters
- $length : int
-
The desired length of the random string.
Return values
string —The randomly generated mixed string.
Numeric()
Generates a random string of the specified length, consisting of numeric digits.
public
static Numeric(int $length) : string
Parameters
- $length : int
-
The desired length of the random string.
Tags
Return values
string —The randomly generated string containing numeric digits.
Seed()
Generates a random seed value.
public
static Seed() : int
Return values
int —A randomly generated seed.