puoi anche usare

mt_rand

è molto più veloce