Re: Request #65501 uniqid(): More entropy parameter should be true by default
On 22 August 2013 05:10, Tjerk Meesters <[email protected]> wrote:
> On 22 Aug, 2013, at 6:58 PM, Yasuo Ohgaki <[email protected]> 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
Thread (19 messages)