rand is used to get the random number in PHP.
Syntax
int rand ( void )
int rand ( int $min , int $max ) // a random number between min and max (inclusive)
But I would suggest to try my_rand, mt_rand uses the Mersenne Twister algorithm, which is far better than the LCG typically used by rand. For example, the period of an LCG is a measly 2^32, whereas the period of mt_rand is 2^19937 − 1. Speed of mt_rand is also better then rand (syntax is same).