array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'function.gmp-export.php', 1 => 'gmp_export', ), 'up' => array ( 0 => 'ref.gmp.php', 1 => 'Funções GMP', ), 'prev' => array ( 0 => 'function.gmp-divexact.php', 1 => 'gmp_divexact', ), 'next' => array ( 0 => 'function.gmp-fact.php', 1 => 'gmp_fact', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/gmp/functions/gmp-export.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.6.1, PHP 7, PHP 8)
gmp_export — Export to a binary string
$num
, int $word_size
= 1, int $flags
= GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): stringExport a GMP number to a binary string
num
The GMP number being exported
word_size
Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter.
flags
Default value is GMP_MSW_FIRST
| GMP_NATIVE_ENDIAN
.
Returns a string.
Versão | Descrição |
---|---|
8.0.0 |
This function no longer returns false on failure.
|
Exemplo #1 gmp_export() example
<?php
$number = gmp_init(16705);
echo gmp_export($number) . "\n";
?>
O exemplo acima produzirá:
AA