On Wed, 6 May 2020 at 13:34, Rowan Tommins <rowan.coll...@gmail.com> wrote: > > On 5 May 2020 09:42:19 BST, Arvids Godjuks <arvids.godj...@gmail.com> wrote: > >So in my opinion, a better replacement for uniqid is needed - > > You're right that the requirements for "random" and "unique" are distinct. > Perhaps what we need is a unique_string function that allows you to specify > the format (length and some control over allowed characters) and uses
This is a problem that would be better solved in userland rather than trying to design and evolve inside core PHP. And already has a very good solution: https://hashids.org/php/ That library is, in my opinion, a much better solution for the vast majority of people who are (mis)using uniqid. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php