samedi 16 mai 2015

Long digit random number create algorithm

I want to create long digit random number in php but there is one question on my mind. What is the best way for performance.

For example first option that i thought.

rand(10000,99999)

but i don't know how would performance be with this. how would it be if even longer?

so i think of this

$randomNumber=rand(10,99).rand(10,99).rand(10,99)...

is it more efective than first one?

Thank you.




Aucun commentaire:

Enregistrer un commentaire