PHP.mk документација

Претходно дефинирани константи

Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.

gmp.constants.php PHP.net прокси Преводот е вчитан
Оригинал на PHP.net
Патека gmp.constants.php Локална патека за оваа страница.
Извор php.net/manual/en Оригиналниот HTML се реупотребува и локално се стилизира.
Режим Прокси + преведен приказ Кодовите, табелите и белешките остануваат читливи во истиот тек.
Претходно дефинирани константи

Референца за `gmp.constants.php` со подобрена типографија и навигација.

gmp.constants.php

Претходно дефинирани константи

Следниве константи се дефинирани од ова проширување и ќе бидат достапни само кога проширувањето е или компајлирано во PHP или динамички вчитано во време на извршување.

GMP_ROUND_ZERO (int)
GMP_ROUND_PLUSINF (int)
GMP_ROUND_MINUSINF (int)
GMP_MSW_FIRST (int)
GMP_LSW_FIRST (int)
GMP_LITTLE_ENDIAN (int)
GMP_BIG_ENDIAN (int)
GMP_NATIVE_ENDIAN (int)
GMP_VERSION (string)
Верзија на GMP библиотеката
GMP_MPIR_VERSION (string)
Верзија на MPIR библиотеката.

Белешки од корисници 2 забелешки

AnonyMouse на Do Not Mail Me Dot Com
пред 5 години
Here is a table showing the output from gmp_export given gmp_init( 0x0123456789ABCDEF ) and various inputs parameters on a little endian 64-bit platform.
NOTE that the underscores in the table are used to illustrate the separation between "word"s (which are either char, short, int, or long).

+-----------+-----+--------+-------------------------+
| Word Size | Sig | Endian | gmp_export Hex Result   |
+-----------+-----+--------+-------------------------+
| 1 byte    | MSW | little | 01_23_45_67_89_AB_CD_EF |
+-----------+-----+--------+-------------------------+
| 1 byte    | MSW | big    | 01_23_45_67_89_AB_CD_EF |
+-----------+-----+--------+-------------------------+
| 1 byte    | LSW | little | EF_CD_AB_89_67_45_23_01 |
+-----------+-----+--------+-------------------------+
| 1 byte    | LSW | big    | EF_CD_AB_89_67_45_23_01 |
+-----------+-----+--------+-------------------------+
| 2 bytes   | MSW | little | 2301_6745_AB89_EFCD     |
+-----------+-----+--------+-------------------------+
| 2 bytes   | MSW | big    | 0123_4567_89AB_CDEF     |
+-----------+-----+--------+-------------------------+
| 2 bytes   | LSW | little | EFCD_AB89_6745_2301     |
+-----------+-----+--------+-------------------------+
| 2 bytes   | LSW | big    | CDEF_89AB_4567_0123     |
+-----------+-----+--------+-------------------------+
| 4 bytes   | MSW | little | 67452301_EFCDAB89       |
+-----------+-----+--------+-------------------------+
| 4 bytes   | MSW | big    | 01234567_89ABCDEF       |
+-----------+-----+--------+-------------------------+
| 4 bytes   | LSW | little | EFCDAB89_67452301       |
+-----------+-----+--------+-------------------------+
| 4 bytes   | LSW | big    | 89ABCDEF_01234567       |
+-----------+-----+--------+-------------------------+
| 8 bytes   | MSW | little | EFCDAB8967452301        |
+-----------+-----+--------+-------------------------+
| 8 bytes   | MSW | big    | 0123456789ABCDEF        |
+-----------+-----+--------+-------------------------+
| 8 bytes   | LSW | little | EFCDAB8967452301        |
+-----------+-----+--------+-------------------------+
| 8 bytes   | LSW | big    | 0123456789ABCDEF        |
+-----------+-----+--------+-------------------------+
See the full table at https://pastebin.com/2GX4L3dq

My conclusions and infrences:
* gmp_export appears to strips sign data as if calling gmp_abs( $gmp_resource ) 
* MSW might stand for Most Signifigant Word (order) as the most significant (highest digit) words come first.
    \- A "word" is a numeric type (char, short, int, or long) determined by the $word_size parameter
* LSW might stand for Least Signifigant Word (order) as the least significant (lowest digit) words come first.
* endianness only matters when you are using a word size greater than 1 because, with a word size of 1, each byte is copied over. With a word size of 2, each short is copied over. 4 is int. When copying numbers larger than a byte, endianness does matter because it changes the order of the bytes within the size of the unit. A 2-byte short will have its bytes swapped depending upon the endianness, but the bits in each byte will remain the same.

This note was too long to post, so I had to move the code to make the above table to https://pastebin.com/gWLU4GF8
i на tiankonguse dot com
12 години пред
when I var_dump these constants,these values is
GMP_ROUND_ZERO  0
GMP_ROUND_PLUSINF 1
GMP_ROUND_MINUSINF 2
GMP_VERSION  "5.0.2"
Навигација

Прелистувај сродни теми и функции.

На оваа страница

Автоматски outline од активната документација.

Насловите ќе се појават тука по вчитување.

Попрегледно читање

Примерите, changelog табелите и user notes се визуелно издвоени за да не се губат во долгата содржина.

Брз совет Користи го outline-от Скокни директно на главните секции од активната страница.
Извор Оригиналниот линк останува достапен Кога ти треба целосен upstream context, отвори го PHP.net во нов tab.