note 117201 added to function.uniqid
| From: | jensenv at cshs dot org | Date: | Fri, 01 May 2015 00:26:07 +0000 |
| Subject: | note 117201 added to function.uniqid | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202406@lists.php.net to get a copy of this message | ||
DUPLICATE UID WARNING: Be aware that calling this function many times in a tight loop (for instance,
to assign UIDs to objects in an array) can result in many of the UIDs being identical, since less
than a microsecond may have passed since the previous call. One simple solution is to compare the
latest value returned with the previous result, and keep calling in a loop until the new value is
different, if you don't mind this call causing a delay of 1 microsecond per call when
necessary.
----
Server IP: 72.52.91.14
Probable Submitter: 192.231.86.253
----
Manual Page -- http://php.net/manual/en/function.uniqid.php
Edit -- https://master.php.net/note/edit/117201
Del: integrated -- https://master.php.net/note/delete/117201/integrated
Del: useless -- https://master.php.net/note/delete/117201/useless
Del: bad code -- https://master.php.net/note/delete/117201/bad+code
Del: spam -- https://master.php.net/note/delete/117201/spam
Del: non-english -- https://master.php.net/note/delete/117201/non-english
Del: in docs -- https://master.php.net/note/delete/117201/in+docs
Del: other reasons-- https://master.php.net/note/delete/117201
Reject -- https://master.php.net/note/reject/117201
Search -- https://master.php.net/manage/user-notes.php