Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80387 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38542 invoked from network); 11 Jan 2015 23:56:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2015 23:56:34 -0000 Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 209.85.212.170 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:43408] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/80-34383-FAD03B45 for ; Sun, 11 Jan 2015 18:56:33 -0500 Received: by mail-wi0-f170.google.com with SMTP id bs8so11042003wib.1 for ; Sun, 11 Jan 2015 15:56:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=B1x3o7XUUKBZpYqXiuqXN0jUocIIpRzCBhjFZygDru0=; b=X/QwySjIBCsLmfgy5P6Fo6+0a0OKT+EhiUyqnc4xJ1WQpNq14eD1FT64Z+14/aWQq6 NcMSnTgPqlRgKzGsQZAX7otmwa47HikrXFBY5BCOilIgmFtI8VtfTjpQDx3Lhs8xsDTY mpmor7HrTfKsUn13iB7ErsovH3KWDNqQsGwd4AqqvgaWKCp3V76DIMsT/zoIuv5e6y0m krqghYb+IYThi9RU/Di1thJxNotpGl5V/LkTGc2Ix3kQHTSctQuofA9rLjg6j6AKndxQ xHpHnsrqRDNJrb7VQRkdgmU02UJoKwrlOAjDMjwUQIKGbh0chIE1iUzMWBPqWrP7oKSJ V/8w== X-Gm-Message-State: ALoCoQkgBth/mnqKeVqnglR6HLZZrm1fyxMt2r11toO7Fj7gkazKvnVSJq5xsmXiAZc8XoOUEMmW X-Received: by 10.180.21.225 with SMTP id y1mr24846076wie.42.1421020588793; Sun, 11 Jan 2015 15:56:28 -0800 (PST) Received: from [192.168.1.66] (83.90.199.146.dyn.plus.net. [146.199.90.83]) by mx.google.com with ESMTPSA id dc1sm7965837wib.18.2015.01.11.15.56.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 15:56:27 -0800 (PST) Message-ID: <54B30DB9.3000003@seld.be> Date: Sun, 11 Jan 2015 23:56:41 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] rand(), mt_rand() and limits From: j.boggiano@seld.be (Jordi Boggiano) Overall it's a good plan IMO and it would clean things up for sure. On the other hand if we don't remove old docs it will just make the docs pages even more complex since the docs for rand() will highly depend on which PHP version is used. On 11/01/2015 22:12, Andrea Faulds wrote: > * Make mt_srand() and srand() do nothing and produce a deprecation notice That is the only point with which I disagree. Looking at http://3v4l.org/FLHBV we see that while indeed across PHP versions the result has not always been the same, it generally is, and especially within one given version setting a seed means you get predictable results. This has benefits in some cases like fixtures generation where it might not be important if the output changes when you upgrade PHP, but you don't want entirely different fixtures every single time. Obviously if we could guarantee the algo won't change it would be even better. Bottom line is I think it's important to have the ability to set the seed yourself. Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi