uniqid() in PHP generates a unique ID based on the current timestamp in microseconds. Is that really a foolproof way to generate a unique ID?
Even assuming there's a single user running a single script with a loop generating a timestamp in microseconds, can there still really be a theoretical guarantee that it's unqiue? And in practice, is the likelihood completely negligible?
For clarity, say your loop is nothing more than this:
foreach($things as $thing){
var_dump(microtime());
}
is there any theoretical chance it might not be unique and, if so, how realistic is it in practice?