|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #32145 Mersenne Twister seed option required
Submitted: 2005-03-01 10:25 UTC Modified: 2022-04-08 08:24 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: hardeman at nmni dot net Assigned: ilutov (profile)
Status: Closed Package: Math related
PHP Version: All versions OS: All OS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: hardeman at nmni dot net
New email:
PHP Version: OS:


 [2005-03-01 10:25 UTC] hardeman at nmni dot net
Unless the PHP documentation is not up-to-date, the only seed option for the Mersenne Twister RNG is a 32-bit integer. The original (updated) MT implementation (see, however, allows for seed arrays of arbitrary length to better exploit the large period of the RNG. It would be nice if this option were built in in future versions of PHP so that I myself and probably quite a few other PHP users won't have to implement the RNG in PHP code itself or create a private extension in C++. Adding this feature to PHP should not require a lot of effort as other implementations are readily available.


1e8bPhq.out (last revision 2013-12-12 18:40 UTC by bebymiss at yahoo dot co dot uk)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-04 15:33 UTC] hardeman at nmni dot net
As a temporary solution, I have now created a PHP class which implements the Mersenne Twister PRNG with the updated initialization methods. I can make this class available to other PHP users - just send me a mail.

Hendrik Hardeman
 [2016-12-30 22:48 UTC]
-Package: Feature/Change Request +Package: Math related
 [2022-04-08 08:22 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: ilutov
 [2022-04-08 08:22 UTC]
There are ongoing discussions about a random extensions. The last (failed) RFC attempt is here. Thus, I'm closing this issue.
 [2022-04-08 08:24 UTC]
Correction: It's under discussion, not failed.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 01:01:28 2024 UTC