← All docs

gmp_random_bits()

Generates a random GMP number with the given bit count.

gmp_random_bits()

function gmp_random_bits(int $bits): object

Generates a random GMP number with the given bit count.

Parameters:

  • $bits (int)

Returns: object

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

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

Internals

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