HEXDEC
Hexadecimal to decimal
SYNTAX
hexdec ( string $hex_string ) : number
PARAMETERS
hex_string
The hexadecimal string to convert. Any invalid characters in hex_string are silently ignored.
HEXADECIMAL | DECIMAL |
---|---|
0 | 0 |
1 | 1 |
2 | 2 |
... | ... |
7ffffffffffffffe | 9223372036854775806 |
7fffffffffffffff | 9223372036854775807 (largest signed integer) |
8000000000000000 | 9223372036854775808 |
... | ... |
fffffffffffffffe | 18446744073709551614 |
ffffffffffffffff | 18446744073709551615 (largest unsigned integer) |
RETURN
The decimal representation of hex_string
EXAMPLES
1
0
0
2
1
3
2
4
9223372036854775806
5
9223372036854775807
6
9223372036854775808
7
18446744073709551616
8
18446744073709551616