random_intGenerates cryptographically secure pseudo-random integers Description
int random_int
( int
$min
, int $max
)Generates cryptographic random integers that are suitable for use where unbiased results are critical, such as when shuffling a deck of cards for a poker game. The sources of randomness used for this function are as follows:
Parameters
Return Values
Returns a cryptographically secure random integer in the range
Errors/Exceptions
ExamplesExample #1 random_int example
<?php The above example will output something similar to: int(248) int(-898) See Also
|