GMP::__construct
(PHP 8 >= 8.2.4)
GMP::__construct — Create GMP number
说明
Creates a GMP number from an integer or string.
参数
num- An integer or a string. The string representation can be decimal, hexadecimal, octal, or binary.
base-
The base to use for converting a string representation.
An explicit base can be between
2and62. For bases up to36, case is ignored; upper-case and lower-case letters have the same value. For bases37to62, upper-case letter represent the values10to35and lower-case letter represent the values36to61. Ifbaseis0then the actual base is determined from the leading characters ofnum. If the first two characters are0xor0X, the string is interpreted as a hexadecimal integer. If the first two characters are0bor0B, the string is interpreted as a binary integer. If the first two characters are0oor0o, the string is interpreted as an octal integer. Moreover, if the first character is0the string is also interpreted as an octal integer. In all other cases, the string is interpreted as a decimal integer.
参见
- gmp_init() - Create GMP number
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。