Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72778 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10784 invoked from network); 23 Feb 2014 23:01:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2014 23:01:17 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.220.46 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.220.46 mail-pa0-f46.google.com Received: from [209.85.220.46] ([209.85.220.46:40507] helo=mail-pa0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/46-57053-DBD7A035 for ; Sun, 23 Feb 2014 18:01:17 -0500 Received: by mail-pa0-f46.google.com with SMTP id rd3so5768592pab.33 for ; Sun, 23 Feb 2014 15:01:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=5w4XVxIQ710tzx7VGTrVvGT0QJM4z9oxStDzWSA+Jmk=; b=hfHM9GUaFtKSoWgEWjg0hLK4Z6DzX/vNfCGrFm41ikN4RECN9TyOvR44O70PO9pyaD +1OprLTxkorVmeJHs4CgzguGIiFHgzhYPHRC1LHDIJjVzeCnKEdt0lMJaSE6NMMGYTNL 0425yKMDu/YLsE5ApN/hOTesu2sg7b9vgLISh7i6Vhs0iAZoOAa1D2z4RU2y1kAuvwtR UtnEpOOIKALxaY4evorXwOQo70xXhoxcIikSXPySQcQzV666o+VeK5XgQ7gL2MWTuA5H pPT5NPTrXWRM2iqtrw+g26pcAvZwkqzfoc9g+gHsvGThRgfgnd8jQxeRZ522Vp2rW8nN SgfQ== X-Gm-Message-State: ALoCoQmgCFEII7FK5cMCIpSy1RxAl5GmcD+Z4ljxSb/VauVnf+rVPuf7+Gc1Z4p3N+GseHnJdQza X-Received: by 10.66.119.136 with SMTP id ku8mr21284899pab.121.1393196474505; Sun, 23 Feb 2014 15:01:14 -0800 (PST) Received: from [192.168.200.49] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPSA id sy10sm104851817pac.15.2014.02.23.15.01.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Feb 2014 15:01:13 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) X-Mailer: iPad Mail (11B651) In-Reply-To: Date: Sun, 23 Feb 2014 15:01:10 -0800 Cc: Stas Malyshev , Nikita Popov , =?utf-8?Q?Rouven_We=C3=9Fling?= , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <70365961-62C1-47C1-90FB-F97686E579AD@lerdorf.com> References: <530A5899.1050203@sugarcrm.com> To: Andrea Faulds Subject: Re: [PHP-DEV] [PHP6] Merging rand and mt_rand() From: rasmus@lerdorf.com (Rasmus Lerdorf) On Feb 23, 2014, at 13:53, Andrea Faulds wrote: >=20 >=20 >> On 23 Feb 2014, at 20:22, Stas Malyshev wrote: >> I would say anybody who relies on RNG producing preset numbers is asking >> for trouble. If you need mock RNG, mock it out, don't rely on >> undocumented properties of the system one. >> But then again, refactoring and unifying RNGs is not very urgent thing >> and a good candidate to put in a major version. >=20 >=20 > What? PRNGs guarantee that for a given seed they will always produce the s= ame sequence. All sorts of things do and should rely on this. Yup, there is a lot of code out there that relies on this. Plenty of games r= ely on this for replays or world generation. Just look at Minecraft world se= eds, for example. -Rasmus=