Re: [RFC] Deprecations for PHP 8.4
| From: | Marco Pivetta | Date: | Tue, 25 Jun 2024 15:55:04 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.4 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123823@lists.php.net to get a copy of this message | ||
On Tue, 25 Jun 2024 at 17:27, Marco Pivetta <ocramius@gmail.com> 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/