I\'m trying to generate a unique ID in php in order to store user-uploaded content on a FS without conflicts. I\'m using php, and at the moment this little snippet is responsib
Since both uniqid() and rand() are functions based on the current time, rand() adds almost no entropy, since the time will change only a tiny amount between the respective calls.
As long as you use the more_entropy
option, you should never have a collision within a single server. If you use clustering, be sure to include a prefix that differs between servers.