Re: [RFC][DISCUSSION] Improve uniqid() uniqueness
| From: | Marco Pivetta | Date: | Mon, 12 Sep 2016 14:48:50 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Improve uniqid() uniqueness | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-95948@lists.php.net to get a copy of this message | ||
On Mon, Sep 12, 2016 at 4:46 PM, Kazuo Oishi <kazuo@o-ishi.jp> wrote:
> Hi,
>
> >> IMO, improving it (generate better semi-unique ID) is not important
> >> enoungh to introduce unnecessary BC break. (Why returning string length
> >> is changed?)
> >
> > It cannot not produce unique ID by default as name "uniqid()" implies.
> > Reason is described in the RFC. Please read RFC because it's the
> > official proposal.
>
> I had read it, of course. But I could not understand why you chose BC
> break way.
>
> Now, I understand your intention to change default value of
> "more_entropy" despite of BC break. You do want to change the default
> behavior of uniqid.
>
> But I cannot agree.
>
> --
> Kazuo Oishi
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Full ACK on what Kazuo said.
I use
uniqid() daily in my test suites, even new ones (not much else),
and introducing the . everywhere will just cause issues.
Changing string length may also break everything.
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/