Re: Request #65501 uniqid(): More entropy parameter should be true by default

From: Date: Thu, 22 Aug 2013 15:56:46 +0000
Subject: Re: Request #65501 uniqid(): More entropy parameter should be true by default
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-68605@lists.php.net to get a copy of this message
On 22 August 2013 05:10, Tjerk Meesters <tjerk.meesters@gmail.com> wrote: > On 22 Aug, 2013, at 6:58 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: >> I realized that not many users are using "more entropy" parameter >> Therefore, I made >> >> Request #65501 uniqid(): More entropy parameter should be true by default >> https://bugs.php.net/bug.php?id=65501 > > I would like to mention that the return value would become 10 characters longer if we enable > this by default. This could break applications that store the value in a database column such as > VARCHAR(20). This is 6.x material to me for exactly that reason — we have changed the defaults for functions with optional behaviour before, but I think this one has more scope to break applications due to the potential for data loss when users have used limited database columns (and I suspect a _lot_ of uniqid() users are storing the result in a database). Since there is a need for "unique" values, would we be better off considering bundling the uuid extension (or something similar) to provide a simple way of generating UUIDs? No BC considerations then, and it's probably a better option for unique identifier generation regardless. Adam

« previous php.internals (#68605) next »