I'm generating a 5 letter uniqid in PHP this way:
$id = substr(uniqid(),0,5);
And every single time I call it, I get the value 5004b
. Why is that happening?
If I remove the substr
, the 5004b
part stays constant while the remaining changes. Isn't this severely reducing the entropy of the GUID being generated?