faqts : Computers : Programming : Languages : PHP : Function Libraries

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 11 people (100%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

Does uniqid still generate a unique id on SMP boxes?

Jun 30th, 1999 21:08
Nathan Wallace, Jim Winstead


Theoretically uniqid may not generate a unique id on SMP boxes. 
Realistically though, it will.

You could work around this by using the process id (getmypid()) as
part of the prefix.

Apache's mod_unique_id also uses an algorithm that avoids this problem,
so that if that is enabled on your server, you can simply use
$UNIQUE_ID.