Re: Deprecating uniqid()

From: Date: Sun, 03 May 2020 16:03:47 +0000
Subject: Re: Deprecating uniqid()
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-109979@lists.php.net to get a copy of this message
On Sun, May 3, 2020 at 2:57 PM Rowan Tommins <rowan.collins@gmail.com> wrote: > > A common suggestion is to use binhex(random_bytes($desired_length / 2)), > which isn't particularly elegant, and in my experience, the main > requirement is "a unique string of printable/alphanumeric characters, so > limiting to [0-9a-f] is just limiting entropy for no reason. > Yes, a base_convert(..., 16, 32) around that would help but I'd really prefer a simple function than a chain of 3 functions (even if we had Larry's pipe operator :-p)

« previous php.internals (#109979) next »