Random numbers are useful when generating random passwords or numbers.
We have been using the rand() function to generate them but it does not generate a cryptographically secure value, php version seven (php7) introduces a new function random_int() which solves this issue.
It takes in two arguments and that is min value and max value and return a value in range to max, incusive.
echo random_int(1, 100);
This will output a random value greater or equal to 1 and less or equal to 100 (1 >= x <= 100)