I always cannot be sure about this when comes to generating the unique number in php.
Is time() more unique than mt_rand()?
time() seems to be more unique to me because a time-date cannot be repeated twice in time.
mt_rand() I am not sure about the unique integer offers by php’s default – will an unique integer be repeated in time?
Have you considered
uniqid()?Also, to answer your actual question: mt_rand will definitely eventually repeat a number, unlike
time(). However, you can only usetime()once a second if you want it to be unique.