gmp_export
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
gmp_export
Референца за `function.gmp-export.php` со подобрена типографија и навигација.
gmp_export
(PHP 5 >= 5.6.1, PHP 7, PHP 8)
gmp_export — Извоз во бинарна низа
= NULL
$num, int $word_size = 1, int $flags Увоз од бинарен стринг): stringExports a GMP number to a binary string. This function can handle arbitrarily large numbers beyond the range of PHP's native integer type, with configurable word size and byte order, similar in spirit to pack().
The sign of the number is ignored; exporting a negative number produces the same result as exporting its absolute value.
Параметри
num-
The GMP number to export.
word_size-
The number of bytes per word in the output. The total length of the returned string will be a multiple of this value. Default value:
1. flags-
A bitmask controlling word order and byte order. Word order:
GMP_MSW_FIRST(most significant word first, default) orGMP_LSW_FIRST(least significant word first). Byte order within each word:GMP_NATIVE_ENDIAN(стандардно),GMP_BIG_ENDIAN, илиGMP_LITTLE_ENDIAN. Default value:GMP_MSW_FIRST|GMP_NATIVE_ENDIAN.
Вратени вредности
Returns a string containing the binary representation of the GMP number. The string is empty if the number is zero.
Дневник на промени
| Верзија | = NULL |
|---|---|
| 8.0.0 |
Оваа функција повеќе не враќа false при неуспех.
|
Примери
Пример #1 gmp_export() example
<?php
$number = gmp_init(16705);
echo gmp_export($number) . "\n";
?>Пример #1 Пример што покажува затворачка ознака што го опфаќа последниот нов ред
AA