Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94325 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61266 invoked from network); 29 Jun 2016 15:51:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2016 15:51:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.180 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.180 mail-ob0-f180.google.com Received: from [209.85.214.180] ([209.85.214.180:33897] helo=mail-ob0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EB/D0-52520-B7EE3775 for ; Wed, 29 Jun 2016 11:51:24 -0400 Received: by mail-ob0-f180.google.com with SMTP id ru5so31260922obc.1 for ; Wed, 29 Jun 2016 08:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=flf3sosZR1+1E6F7GCqkPswkS1f+5Rel9+dkHr45z/g=; b=l64uu2olSIpAZoyZaH6rxd5+g+9NrbqfehcXCKaOiqxPd+E1MdwzJ5/iMAzdkwdurr 5tgJJuoIg5s4jSSVvf+nSn+jGlj2Qq579dU72B/jvNE2Rz4zzfpCEpr67gDDR5cKfclX ZmJWq1EnqIkhfnNLXb9sdqZYlFGfgqEDLddyJJ2lfwIVP76CyZpEaS8eRNJFzVWv5OUI rmIQj79Co0/d9YO82M9nO5feW5tBRudfhFCopsjjEfTuoF1q2NNqfhAHcjO4LX3cqpwX FfqY/9SD0G3lFhXst537qpeLm0qytxu9k3JG7EntdiykRh+mOIuHLdeze42J3wTPVrgy w3gw== 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:date :message-id:subject:from:to:cc; bh=flf3sosZR1+1E6F7GCqkPswkS1f+5Rel9+dkHr45z/g=; b=EMIxl4YkglNrmsvuTO7xhkQri+354Kng67SOant7OM3jXcslaNHGE4FA/EnvSbHhqb 828G9MtYX41fgu1FnS4zEV9KzHHAxwa0kNWJSBqX5NLFPJlVJ7HLQBbK0YoszNYW/tp4 SF5/KN35ecSdK1xSGVP8vWHw83lUIj0BBQjm7ax7JJ1/zqxT7jQZ5v4b4LqBnEdCsXP5 3/Cl34ChtGFT8KBCia5Ygb3z48lexqtEztGH5veOzdWZbw2/HF8lzwi9e3Wj3jNdkTRt mn4sKV0mWCjj9Nnu8v1PC5DwW9ONobKXsebjyeWGc8wFH/WESONNb3+QCFIPZZrStgWa l6HA== X-Gm-Message-State: ALyK8tJVaMW/WHt0ffZM0JRynbAnceYIEDE/EYFN5/g26uStVO1tuHg6H8yFbK+pM2WEI53TTjhP9+l9FmyJOA== MIME-Version: 1.0 X-Received: by 10.202.76.77 with SMTP id z74mr6240568oia.33.1467215480330; Wed, 29 Jun 2016 08:51:20 -0700 (PDT) Received: by 10.202.190.3 with HTTP; Wed, 29 Jun 2016 08:51:18 -0700 (PDT) Received: by 10.202.190.3 with HTTP; Wed, 29 Jun 2016 08:51:18 -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 22:51:18 +0700 Message-ID: To: Leigh Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c15d9e83a18a05366cb9e1 Subject: Re: [PHP-DEV] [RFC] RNG fixes From: pierre.php@gmail.com (Pierre Joye) --001a11c15d9e83a18a05366cb9e1 Content-Type: text/plain; charset=UTF-8 On Jun 29, 2016 10:03 PM, "Leigh" wrote: > > 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) Yes that would make it. Even if i would prefer the other way for at least one version. --001a11c15d9e83a18a05366cb9e1--