Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94229 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68075 invoked from network); 23 Jun 2016 16:57:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2016 16:57:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.52 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.52 mail-pa0-f52.google.com Received: from [209.85.220.52] ([209.85.220.52:35321] helo=mail-pa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/31-58020-ED41C675 for ; Thu, 23 Jun 2016 12:57:03 -0400 Received: by mail-pa0-f52.google.com with SMTP id hl6so29006519pac.2 for ; Thu, 23 Jun 2016 09:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=rmgMjtqOCqf/MbtER0oGtmoP9t66rd2t6aI+NPXelqc=; b=LxULVMlIEHQ8jIi0K4mnKDKMfeQnCxVoF9BJ/heYFvzea3GwIitnKoKTUPfTtBhyGw he0MS9n8PcvfNK2jO+zeka/9isuYsoCd2lsQ3wD+wHunbDcTUtz2YUd1+nr+CXqkd5i3 8kvU73ZNF0SUIDnBXAIhP7gZ+7NEozG8Dx90p1oGjjd290U7NQUxAwlHJEFJ9AZqVsl8 CoKg31E9V1wmr1nZ9JN6utQnerVVjVNBgKKL2lOP6XahynXUQxEn+p84fCAs3hCD8Sfo V8tOpcdgVXwItgaoJKd5qJDAISiU+MaVWPPsJcpOkPbt0g1dHxC5eonBdGMFBEUtgEwy oVmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=rmgMjtqOCqf/MbtER0oGtmoP9t66rd2t6aI+NPXelqc=; b=FMpkV7Ms3S+RU9BDoeiEteF0Cp8rHbi/sVusST25Gil0rnjyVu1ZEjhNpnlHhIwQAY fWPGX29aHRBo0TV92muc7meBGG9QFeN6o9Z7wReJYj+85g/yE8LRIyjgVQE/5/JyMHSN NowgTWMlMJ3yu98OTLtxrx6RSyv4bHKgwZEi6whNyMUx2q9H/0nFdgt9ikRBKifGcscb svaWZkNsfEczy1WlyKtcxaAEFRlMRAp8j12vbvfFtjMIpGY2N7jGxlNdKfnr/SrvYt0S 2XTmrBV0gK5TG3L5mTPV00zwZg0WX8YjRYk0j85ettZZD54IPpWX0NEwtlg1f9wEhu5+ eYvA== X-Gm-Message-State: ALyK8tJ37XejN1+AIXTe9ck5XK3ON3VRlQZG5cOoP0uRmiIg7j6L+Xp7EjgVnpBRSA1SBw== X-Received: by 10.66.161.41 with SMTP id xp9mr44576061pab.78.1466701020061; Thu, 23 Jun 2016 09:57:00 -0700 (PDT) Received: from stas-air.corp.wikimedia.org (tan1.corp.wikimedia.org. [198.73.209.1]) by smtp.gmail.com with ESMTPSA id s65sm1394758pfd.23.2016.06.23.09.56.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 09:56:59 -0700 (PDT) To: Rowan Collins , PHP internals References: <2f92fa26-5f50-0e68-c1fc-de79f17c201e@fleshgrinder.com> <8b48f847-bbba-03f8-4b2e-9cd0841b484e@gmail.com> <65ea0142-c2d6-f4ed-e98e-b7c7fbc51c58@fleshgrinder.com> Message-ID: <0e4655b3-d0cb-f1cc-6e39-c336ed51e2de@gmail.com> Date: Thu, 23 Jun 2016 09:56:57 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] RNG fixes From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > I would prefer something like random_fast_int() == mt_rand() == rand(), > with clear documentation on when to use random_fast_int() instead of > random_int(), and a note on the others that "since 7.2, mt_rand() is an > alias for random_fast_int()" etc. (Not wedded to the name > random_fast_int, we can bikeshed that later.) That sounds to me like a good way to proceed too. I don't think it's a big deal it mt_rand won't be using specific MT algorithm anymore, I see very small number of places where it would matter. One thing to consider is that there might be test scenarios, sequences, etc. that depend on specific seed and will be broken by changing the implementation (tests relying on specific rand are not the very best idea, but they do happen), but I think this kind of thing may be acceptable for a major version. Would like to hear thoughts on this though. -- Stas Malyshev smalyshev@gmail.com