On Tue, 25 Jun 2024 at 17:27, Marco Pivetta <[email protected]> wrote:
> * uniqid()
, in my case (XKCD 1172) is largely used for quickly
> generating a semi-random string for test purposes: a suitable replacement
> PRNG implementation would be welcome. Even refactoring with tools like
> Rector will lead to quite messy code, or added dependencies. IMO fine to
> get rid of **this specific implementation**, if a safe function is
> provided, such as random_ascii_string()
or such (dunno, just a hint)
>
Update: Tim gave me a decent alternative that I can live with.
uniqid()
becomes bin2hex(random_bytes(16))
.
I can live with that :-)
Marco Pivetta
https://mastodon.social/@ocramius
https://ocramius.github.io/