Generating a unique string
Generating unique string: uniqid()
If you need to generate a unique string, you may use the uniqid()
function.
It is not a random generation function. It returns a timestamp with microseconds in string format.
You can prefix a string to distinguish your unique values.
The function uniqid()
with prefix
The function uniqid()
with prefix adds more entropy: