lundi 14 septembre 2015

Why is mt_rand faster than rand() for php random numbers?

I am trying to create a captcha functionality so just wondering abut a statement on some forums that

mt_rand() is faster than rand()

It is said this is because Mersenne Twister algorithm.But in reality how much impact do you think this will make in a string min, max of (0,10). And why should we use mt_rand. Is it upgraded version of rand()?




Aucun commentaire:

Enregistrer un commentaire