randomDigit
Generates a random integer from 0 until 9.
randomDigitNot
Generates a random integer from 0 until 9, excluding a given number.
randomDigitNotNull
Generates a random integer from 1 until 9.
randomNumber
Generates a random integer, containing between 0 and nbDigits amount of digits. When the strict parameter
is true, it will only return integers with $nbDigits amount of digits.
randomFloat
Generates a random float. Optionally it’s possible to specify the amount of decimals.
The second and third parameters optionally specify a lower and upper bound respectively.
numberBetween
Generates a random integer between min and max. By default, an integer is generated between 0
and 2,147,483,647 (32-bit integer).
randomLetter
Generates a random character from the alphabet.
randomElements
Returns count amount of random element from the given array, traversable, or enum. By default, the count parameter is set to 1, when null a random number of elements is returned.
randomElement
Returns a random element from the given array, traversable, or enum.
randomKey
Returns a random key from the given array.
shuffle
Returns a shuffled version of either an array or string.
numerify
Generate a string where all # characters are replaced by digits between 0 and 9. By default, ### is used as input.
lexify
Generate a string where all ? characters are replaces with a random letter from the Latin alphabet. By default, ????
is used as input.
bothify
Generate a string where ? characters are replaced with a random letter, # characters are replaced with a random
digit between 0 and 9, and * characters are replaced with either a random letter or a random digit. By default, ## ?? is used as input.
asciify
Generate a string where * characters are replaced with a random character from the ASCII table. By default, **** is
used as input.