← All docs

gmp_export()

Exports a GMP number as a binary string.

gmp_export()

function gmp_export(object|string|int $num, int $word_size = 1, int $flags = 17): string

Exports a GMP number as a binary string.

Parameters:

  • $num (object|string|int)
  • $word_size (int), default 1, optional
  • $flags (int), default 17, optional

Returns: string

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

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

Internals

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