Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120460 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54652 invoked from network); 30 May 2023 15:52:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 May 2023 15:52:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B735218053F for ; Tue, 30 May 2023 08:52:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 30 May 2023 08:52:43 -0700 (PDT) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2af1ae3a21fso50199571fa.0 for ; Tue, 30 May 2023 08:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685461961; x=1688053961; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=C8TaYJFeD3TwEmlFaVYtTDADHGShs0FaLLvVBrO7L1g=; b=g2IIE1C1kqNCjTBHqE9otRMlhr5j3A3ZOCHz5UoYMVO7bstnt1+qZIpQUaJs/2yX7X QbP50xMKHfz4SXthpnSEoaZaFN11pjEzWY/KYwuAak1iaoGXbQGLu+p1zp7tNskp4Sn3 8DLSZLg6zUDjknOw2w05szHiVKaL+aF+z3xWSc8Gz0VBH52ps/Z5x07ATzap+E6M7deh /oFsde+/rIyUGwJ3jx3lUx3G8EkHGZ9WtXY+VQ4qqsQYhpuNZBoEA1CZWzwv+WUJR73w 6My05KzhBObZ2cQziVV4U24e1COs98t+ytvCkhWgB9zlFUMKnsJ+rGtO6ar0Od7o0TuR bbnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685461961; x=1688053961; h=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=C8TaYJFeD3TwEmlFaVYtTDADHGShs0FaLLvVBrO7L1g=; b=J6ft3Mdr66TqmGCpnnDkrn8qM0ORzRlfuYRM9aigW3pQSahWU5GE5JGEdtVsFnksXJ i1McGiNArwhcQLiT9GWOFg+zQjzUJtXy5XIBSXHIE5E7Z0JqzvTKxYPaf3YqMPWLYKgA 3ZWdpGQhIr0KaP4zASbQaO7v3k8BowkDJHALnL3sbGnkz80GEDBcktF82GfpXH5IiM6v zISFKWC74bPXKGlInM+E6CMzdlGzPKuc5ujkve6Yg6oLAs35qC2zw5BtSy9jm9UWIlwR +b9at7rwAyOv67TRHmDetzmn7TN3WOdCPQM/YNI0ye/DTiqkJNqMejAe+TkzIuRj6CS0 /0pQ== X-Gm-Message-State: AC+VfDz22BhpsLKFHCVMRHvxbhKGkQcumoIMeOYHeiqz/q5Y22YNIOOe M9sHiWG+mNnS90ME/JrHSOBcpAeuNh97WClmmebA46wjOtc= X-Google-Smtp-Source: ACHHUZ4QKnVpKJp7kRU2XY3t8Xre37o7pB4ohi3eeESDpT1HXc5T1DnPBvQ1WNTBwYpdZIMEnWmdsQCGzi7yhcthtko= X-Received: by 2002:a2e:9c50:0:b0:2af:160d:888a with SMTP id t16-20020a2e9c50000000b002af160d888amr1197880ljj.1.1685461961138; Tue, 30 May 2023 08:52:41 -0700 (PDT) MIME-Version: 1.0 References: <9ea3a5af-679d-ad63-f9c2-e0d8d148db3f@bastelstu.be> In-Reply-To: <9ea3a5af-679d-ad63-f9c2-e0d8d148db3f@bastelstu.be> Date: Wed, 31 May 2023 00:52:30 +0900 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000079e6c505fceb3121" Subject: Re: [PHP-DEV] [RFC] [Discussion] PHP 8.3 deprecations From: zeriyoshi@gmail.com (Go Kudo) --00000000000079e6c505fceb3121 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2023=E5=B9=B45=E6=9C=8830=E6=97=A5(=E7=81=AB) 4:49 Tim D=C3=BCsterhus : > Hi > > On 5/29/23 08:44, Go Kudo wrote: > > I realized I was about to add the deprecation of `lcg_value()` and forg= ot > > to do so, so I added it. > > > > https://wiki.php.net/rfc/deprecations_php_8_3#global_combined_lcg > > > > As usual, my English is of low quality, so I would appreciate it if you > > could point out any problems. > > I think it's too early for that. Because: > > 1. The replacement is only available as of PHP 8.3. Thus there won't be > a single version where "replacement is available" and "the function does > not emit deprecation notices" is both true. It should be deprecated with > PHP 8.4 at the earliest to give folks at least (!) one version to > cleanly migrate existing code without suppressing any errors / notices / > deprecations. > > 2. It's not seedable, thus the implementation can be switched to use a > different engine without affecting existing code. > > 3. It's not as commonly misused as mt_rand() is. Primarily because the > possible use-cases are much more rare. > > Best regards > Tim D=C3=BCsterhus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > Hi > It should be deprecated with PHP 8.4 at the earliest to give folks at least Indeed, I agree that `lcg_value()` should be deprecated at least in PHP 8.4= . However, `lcg_value()` remains a dangerous function. It still has a weak initial seeding problem (PID, time), not to mention global state. This is extremely dangerous for workloads on containers where PIDs tend to be fixed. Perhaps this should be documented at the time of PHP 8.3 release. Because of the above, I have removed my `lcg_value()` deprecation entry from the RFC. Thanks! Best Regards, Go Kudo --00000000000079e6c505fceb3121--