|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33982 add functionality for gmp_nextprime (includes patch)
Submitted: 2005-08-03 18:10 UTC Modified: 2006-08-27 16:25 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: korte-php at et dot ruhr-uni-bochum dot de Assigned: stas (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 4.4.0 OS: Linux
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: korte-php at et dot ruhr-uni-bochum dot de
New email:
PHP Version: OS:


 [2005-08-03 18:10 UTC] korte-php at et dot ruhr-uni-bochum dot de
In order to use the php-gmp functions for cryptographic purposes, having mpz_nextprime ist sort of essential.

Reproduce code:
url to patch (51 lines)

Expected result:
Use like:

  $rand1 = gmp_random(10);
  echo "Random: " . gmp_strval($rand1) . "<br>\n";
  $prime1 = gmp_nextprime($rand1);
  echo "Next Prime: " . gmp_strval($prime1) . "<br>\n";

Actual result:
Working fine in our installation - would like to have in the normal distribution as well :)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-03 20:55 UTC]
seems to be a good addition to php 5.1.1!
 [2005-08-03 21:43 UTC]
Stas, please take a look at it.
 [2006-08-27 16:25 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Fixed in 5.2 & above
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 05:01:27 2024 UTC