Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94324 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56536 invoked from network); 29 Jun 2016 15:03:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2016 15:03:48 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.51 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.215.51 mail-lf0-f51.google.com Received: from [209.85.215.51] ([209.85.215.51:35839] helo=mail-lf0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/40-52520-353E3775 for ; Wed, 29 Jun 2016 11:03:48 -0400 Received: by mail-lf0-f51.google.com with SMTP id l188so35580794lfe.2 for ; Wed, 29 Jun 2016 08:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zmO7UNgfci6Cnr0d/eCxtoqgjXiGkGREwxyJZIYFarY=; b=Z5Se8obgtGtd5I2CSn4tvCcoT2SDu9eaMRQQPld2wY6bDq1ricINu961lmXRPLCy87 lvC9Nr5k43SVwwP94/QKe6WjO3GCwfc8wRT13HKiyMudD5yQwFm6Olh74a1o7iL7uZ5S DmbSozHVgYLerIWTDIt7BndrHWD8kW/Vpsv4ctEIVS1y2G9xqrPsjoJevT2ny7CmZi+P 4omEOBS86WhZ7VeQmOL6DUGGiC0IQ9MqTiyBy07Vii0p7yXpfWNiHqJZe3rfm8RZtdQk hiWiH+QwzGoeucJ3LVvylyPgkVOsUDpAvZRXhwdUZsVMBYOSS7yyBh3XiwznpX4MV9n8 /UIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zmO7UNgfci6Cnr0d/eCxtoqgjXiGkGREwxyJZIYFarY=; b=jXup01WKIeX4+D4eEHz+M84Db1CWz97Z1ljguzF4Ret3XuFFNSnGPWd5ZsqqJHfT+Z ll5CNw3m70pngsHKoWgCatx0VtPkjMWHmxguaVDcnlLUw2rLN7ieLF7TTZUr/NUSPDL/ 9HPlo7BUNL8dWzoMWSPyGwBxSdbGmZhj7BmkofoNtnL7zLYPzCfmI0c3TmA1ahxYrJH7 B+Gi61NnvN9fJ+DJxr5Z0romwXcBfc6uIo7D8qoZlShOpTUH14md1QwA5DT369hq8yYJ DN1lVa6Efe7N72FGw6Ry//7XC0z54as9oIJdJ6wNx13qyT6FF7jRrbZcDmvKBqmVAtDz NGCw== X-Gm-Message-State: ALyK8tK70EWmsYEdnsi2pyya73+OYEHuP4McYDGpQbmsPI4jeANRwXsHumA6ph+p8K8j7QOYaNfZxt7p6gMdJQ== X-Received: by 10.25.210.20 with SMTP id j20mr3097297lfg.139.1467212624315; Wed, 29 Jun 2016 08:03:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.27.77 with HTTP; Wed, 29 Jun 2016 08:03:42 -0700 (PDT) In-Reply-To: References: <1ee34970-76f4-e6c6-df1e-a827e3fc592d@fleshgrinder.com> <25bb59bb-d9ac-5ab3-f0bb-d80e6b3fe745@fleshgrinder.com> <55ceae84-5e24-96b4-bb0f-bd8c71c057ef@fleshgrinder.com> Date: Wed, 29 Jun 2016 16:03:42 +0100 Message-ID: To: Pierre Joye Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] RNG fixes From: leight@gmail.com (Leigh) I think I've caught up on everything discussed now. One thing I would like to point out, when people have searched for "legitimate uses" of mt_rand(), you should have been looking for legitimate uses of mt_srand() - this is the functionality that will be broken. On 16 June 2016 at 03:21, Pierre Joye wrote: > There are ways to achieve what you want in a nice way while not breaking > things. Let consider them. > > Cheers, > Pierre So what would you suggest? mt_rand_mode() with constants for correct and legacy? (defaulting to correct, and a single fcall for users to get the old behaviour back)