Re: uniqid() is not unique under windows
| From: | Anatol Belski | Date: | Sat, 08 Feb 2014 22:19:05 +0000 |
| Subject: | Re: uniqid() is not unique under windows | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72415@lists.php.net to get a copy of this message | ||
Hi Yasuo,
On Sat, February 8, 2014 22:14, Yasuo Ohgaki wrote:
> Hi Pierre,
>
>
> Why is uniqid() is not guarantee uniqueness under windows?
>
>
> https://bugs.php.net/bug.php?id=65626
>
its base are microseconds, so nothing prevents to usleep() in user space.
It's also documented to be nonsecure, so isn't it just the expected
behavior?
> It seems PHP_WIN32 and __CYGWIN__ check is obsolete.
> Could it be removed?
>
Never compiled with cygwin. However what stands in the code might be true
needed, as cygwin is proxying native APIs, so it is expected to be much
slowlier. Maybe there are other reasons for that, though.
Regards
Anatol