Re: [RFC][DISCUSSION] Improve uniqid() uniqueness

From: Date: Mon, 12 Sep 2016 10:48:04 +0000
Subject: Re: [RFC][DISCUSSION] Improve uniqid() uniqueness
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-95935@lists.php.net to get a copy of this message
Hi, > I know some code breaks, but it's not many. It's not fatal BC also. > > IMHO, uniqid() should try to generate uniqid() possible. uniqid() does produce > non unique ID because it is system time based. This change mitigates impact of > misuse also which is common in both open and close codes. > > Which is important? > - Fix known issues and generate unique ID (as much as possible) > - Let it generate non unique ID and ignore for some code may complain. IMO, improving it (generate better semi-unique ID) is not important enoungh to introduce unnecessary BC break. (Why returning string length is changed?) If good unique ID generator is needed in core, please create new function with another name like "unique_id". -- Kazuo Oishi

« previous php.internals (#95935) next »