In PHP, we have the choice of mt_rand() and rand() where mt_rand()
uses the Mersenne Twister algorithm and rand()
uses the libc random generator.
I would like to choose a random item out of an array using array_rand. However, does array_rand
use the Mersenne Twister algorithm?
It is quite simple to implement my own array_rand
using mt_rand
, but if array_rand uses the Mersenne Twister, then all the better.