Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118290 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 34302 invoked from network); 20 Jul 2022 12:27:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jul 2022 12:27:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 872A61804BE for ; Wed, 20 Jul 2022 07:24:25 -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=-0.7 required=5.0 tests=BAYES_05,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-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (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 ; Wed, 20 Jul 2022 07:24:25 -0700 (PDT) Received: by mail-oi1-f169.google.com with SMTP id p132so11032192oif.9 for ; Wed, 20 Jul 2022 07:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=/XjSooSiGrFcHVxO+N7wQHc0KFBjgRSIdn8cbn/8YwU=; b=RKX8YWfejezof3eufpZDSFy+4eG4k7vXWh5PuxGpTXLYv+qBO6BydaJqkkq3m0e1XN 1FTR3NwL4lxRIudUhbIDB/zMnwDbjsoV2+GjzEyPns3Rj2Kn9TpV6OsyUHvxWs8Ukb27 svtvVyKinnWDgJiKqKI87q+8btIKejhgRstAUdW5YSn1vtwbCjM4QdS3cTb73V9tBvaw mb+87hBpmM7TJRpqQIk7Bgk7jZHEJCRjDTfFTnBHLvHPIRTlprS2AriGizG+McQJddq1 coWuUBhhLS+ap9/HFUB2m926cUhXa00wlFlYSocnuhygqrFnayE8saelovLn+6nexgaU ue+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/XjSooSiGrFcHVxO+N7wQHc0KFBjgRSIdn8cbn/8YwU=; b=L9fYDL66zxjqLel0JGf3juKlisHzKDtmZrUSP36Znd/dkJWN56l1Sm1uwZgQBoC6Pl HYD3FO5cqwQCkPRgh3fhp0SxW8hWduISkHGxquQ+ltMTb1UY4BS4w0uoZmNUqDXXXtds tOgJZ0AUUwUZsZ0aaYvNx1ldyvKiVH999v+pvKiRIgvwuatl1wvxuK74HAc7qEZxkyyH mNXZOhLDD5GnnfgCqHfq6K56bL/0Vspl6+tOFCRD66PGtcJHdDzEyTL+cS0Lhpx45cDV 9msYFbJ41Z60byd3arJ3MNKXiwXFfnoE5bwzmJcvx6Pd39jodEqD7fNIwlk7UY0cxczY b6gw== X-Gm-Message-State: AJIora+I9CpPolImWo/vdUzl85oLFD94vKU+NNN0nGc9NrUvm7aXdBXr fbgJLykEQeaJph6gKX5FpyDSxci8qlRnx8qanDkhhEoskkA= X-Google-Smtp-Source: AGRyM1sVYEPnnp+rb6DRWTa+0fXO+LAQ85YPFuXb6Y9DIT0vnm8CPMbv+syke8H0QRL1bRn2arp83ToIAaNfMnNtUuM= X-Received: by 2002:a05:6808:bce:b0:337:aaf6:8398 with SMTP id o14-20020a0568080bce00b00337aaf68398mr2450945oik.252.1658327064242; Wed, 20 Jul 2022 07:24:24 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 20 Jul 2022 23:24:12 +0900 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000095ef3f05e43d5b08" Subject: Random Extension 5.x needs follow-up From: zeriyoshi@gmail.com (Go Kudo) --00000000000095ef3f05e43d5b08 Content-Type: text/plain; charset="UTF-8" Hi Internals. The Random Extension 5.x and Random Extension Improvement RFCs have been passed and recently merged into the master branch. However, the proposal is still problematic and implementation fixes are needed. Currently, the mt_rand() function is overloading its arguments, and I have designed a Randomizer::getInt() signature based on this. However, argument overloading has several problems, including reflection, and is now not recommended. I wish I had been aware of it during the RFC proposal, but that did not happen. To solve the problem, I thought of separating the argumentless `Randomizer::getInt()` as `Randomizer::nextInt()`. `Randomizer::getInt()` must require `int $min, int $max` arguments. I have received support for this proposal from several people, but there will be a discrepancy between the RFC and the implementation. I believe this should be corrected to avoid future BC Break, what do you think about this? Discussions: - https://externals.io/message/118163#118269 - https://github.com/php/php-src/pull/8094/files#r919693108 (just scroll a little please) Fix PR: https://github.com/php/php-src/pull/9057 Best Regards Go Kudo --00000000000095ef3f05e43d5b08--