Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123823 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 6A99C1AD8ED for ; Tue, 25 Jun 2024 15:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719331000; bh=ZHSwYeuMBDGLffsQHKubFxVjbIAoHjsO6SW17+BmX2Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=auUeN4B0aswOX/ZdOSqulv4zvfNnLGKDnVYkpAaDVOubdbHrT7IDDRHTgdClwTpwl BoHms3NKRWMH4yZBx6z34qxlGAi91a1aguh2afWxgk/VQe+pXYhP9lajVb2do9JCb+ dsSH3UTssDP4p3r8bgSYucoW+dmSsw6ZwGsTcgUKxyNbxsWqFLT+taYZTKuvATwhzi S/c43MiHOtsUk+bSmGRyHzdmpbKd6BJ4kPqGhqS/uqW95Oi5MwcSK7wX3aGF1cmn5x kcS0grZh1FW/edcLyIZ5TC+Z59OPfhTNqEkhjh6J71GhWZX3Tu4aQfoNVPwKMDTQJM JznKxQ4/Uk7QA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D7544180B97 for ; Tue, 25 Jun 2024 15:56:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 25 Jun 2024 15:56:35 +0000 (UTC) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7163489149eso3454306a12.1 for ; Tue, 25 Jun 2024 08:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719330917; x=1719935717; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jVFTsgEyN4Zc5Qs+ppfI3bFBoelNbp1dD/cendiNV3E=; b=NQ58W99hyqnhdk9y/uSKTNeSEsa91K3BN4hdn0z7coAhebP6WTpg2OOKtdFlFHxjE/ hvl/66sUuCBoossmfnNTr5OpnagE3UumWvUYy8gFXaMZTzLGnFxCeEx6W7mj2mJsGQ/l XmQmgwHfuGa7s0Olww1dKJ/fQIRRJRJevMfer0TCWmPb1uHv/ok0IQs77XF6uP9DHlTV YQd+mcZSDE6JBVQCvSELf9Tgv5WMoLFmL8NOAwYiNdB41pfMVVQI2Fhs5Ep9RZTq1u4i yntmjGcA/n5OuTFOQarH0kDwTgXVJ5uhFHM9as3T0pd0OmZKyUhKnmWv482hAyPi59Dd HZRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719330917; x=1719935717; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jVFTsgEyN4Zc5Qs+ppfI3bFBoelNbp1dD/cendiNV3E=; b=ll8hjBKCOVkb1Xh2JsGw2s5y/0QuTjzMoWnKBJbNvqC8vf6zL6HKylzeCRLEtalEWS Yg2NYNUw5HTtrErzPJtiTsL+bsiPbYmFaMLDQCw1N+JzJe8iKDqZoDtaQ2F8dcebLOYi A7FIrmkp6CBNyR/RsfzRkbk6vb88bp00HmZtFm83w2bMgWuDHjeA8wAhJaq7iSdMLjC3 33Tc94MVqXKkA8bX8TgVP9PsJOkZa2q7IrDAhojxWfFisQml38HlQ5htHRNky1NoCow+ vkLpbih9UwDmcRMa7JPOu7xY1K+8eO89z1RxrSnn6ubYVJUCPCu25QwhDre7CsdH98Yo BDDw== X-Gm-Message-State: AOJu0Yw2NT1kv5ZNtJiofw+xQ2ia0/jKUEBsi+n176DktcNWKCPm9ySq ktPeXrSexZ/Td7gRUkmYDzJe86kenRyyKRor/csVLqYTNh5/ww7Ka14/QQiTFPzzhrEInpr6tMK JybbZnzNV8zxWbhMOrzR450IEGNg= X-Google-Smtp-Source: AGHT+IEXPXUzGz7bj7Bj1h8wktF+rvHk+wkH2QeRwQs4tTHsLBRKIkWQIYlJXP2rNhpSlPiE7ivFn92hiXyF4HLVthY= X-Received: by 2002:a17:90a:7806:b0:2c8:d0a6:1d10 with SMTP id 98e67ed59e1d1-2c8d0a61e1dmr40027a91.41.1719330917153; Tue, 25 Jun 2024 08:55:17 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 25 Jun 2024 17:55:04 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 To: "Gina P. Banyard" Cc: PHP internals , timwolla@php.net Content-Type: multipart/alternative; boundary="0000000000009186ea061bb8ec69" From: ocramius@gmail.com (Marco Pivetta) --0000000000009186ea061bb8ec69 Content-Type: text/plain; charset="UTF-8" On Tue, 25 Jun 2024 at 17:27, Marco Pivetta 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/ --0000000000009186ea061bb8ec69 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Tue, 25 Jun 2024 at 17:27, Marco Pivetta <ocramius@gmail.com> wrote:
=C2=A0* `uniq= id()`, in my case (XKCD 1172) is largely used for quickly generating a semi= -random string for test purposes: a suitable replacement PRNG implementatio= n would be welcome. Even refactoring with tools like Rector will lead to qu= ite messy code, or added dependencies. IMO fine to get rid of **this specif= ic 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 w= ith.

`uniqid()` becomes `bin2hex(random_bytes(16))`.

I can live with that :-)<= /span>
--0000000000009186ea061bb8ec69--