PHP 8.6 | NewFunctions: detect new GMP functions - #2094
Merged
Merged
Conversation
> - GMP: > . Added gmp_powm_sec() for side-channel quiet modular exponentiation. > Requires GNU MP 5.0.0 or later; it is not available on official Windows > builds using MPIR. > . Added gmp_prevprime() to get the largest prime smaller than the given > number. The optional $definitely_prime output parameter indicates whether > the returned number is definitely prime, as opposed to probably prime. > A ValueError is thrown if no such prime exists. This function is available > only when PHP is built against GNU MP 6.3.0 or later; it is not available > on official Windows builds using MPIR. > - GMP: > . gmp_powm_sec() > . gmp_prevprime() This commit accounts for detecting use of the new functions. Includes test. Refs: * https://github.com/php/php-src/blob/daf21f4630812168666bfba9ed7de710ebefae4f/UPGRADING#L351-L360 * https://github.com/php/php-src/blob/daf21f4630812168666bfba9ed7de710ebefae4f/UPGRADING#L634-L636 * php/php-src 22852 * php/php-src@081106e * php/php-src 22807 * php/php-src@7abd493 * php/php-src 22907 * php/php-src@6459664 Related to 2052
wimg
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit accounts for detecting use of the new functions.
Includes test.
Refs:
gmp_prevprimephp/php-src#22907Related to #2052