How does one generate a random float between 0 and 1 in PHP?
I\'m looking for the PHP\'s equivalent to Java\'s Math.random().
Math.random()
I found the answer on PHP.net
float(0.91601131712832) float(16.511210331931)
So you could do
randomFloat(0,1);
or simple
mt_rand() / mt_getrandmax() * 1;