As php.net indicates: random_int() function Generates cryptographically secure pseudo-random integers.
But, Can someone explain whats the difference between rand() & random_int()? Can I use random_int() instead of rand() when only requiring a random integer? Which one is faster?