|  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: 2016-12-30 22:48 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: hardeman at nmni dot net Assigned:
Status: Open Package: Math related
PHP Version: All versions OS: All OS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Oct 16 12:03:34 2021 UTC