← All docs

gmp_nextprime()

Returns the next prime greater than a GMP number.

gmp_nextprime()

function gmp_nextprime(object|string|int $num): object

Returns the next prime greater than a GMP number.

Parameters:

  • $num (object|string|int)

Returns: object

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how gmp_nextprime is implemented in the compiler, see the internals page.