On 22 August 2013 05:10, Tjerk Meesters <tjerk.meest...@gmail.com> wrote: > On 22 Aug, 2013, at 6:58 PM, Yasuo Ohgaki <yohg...@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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php