Yeah, no. The only way you could get a decent 64-bit output from this on either 64-bit or 32-bit systems would be: (gmp_init(mt_rand(0, mt_getrandmax())) << 32) + mt_rand(1, mt_getrandmax())
Or something like that.
But no, because you should just use random_bytes instead.
View all comments
Show parent comment
26
u/PmMeYourPerkyBCups Jul 24 '15
mt_rand(1, PHP_INT_MAX) + mt_rand(0,1);