The dechex() function converts a decimal number to a hexadecimal number.
string dechex ( int $number )
Returns a string containing a hexadecimal representation of the given unsigned number argument.
The largest number that can be converted is PHP_INT_MAX * 2 + 1 (or -1): on 32-bit platforms, this will be 4294967295 in decimal, which results in dechex() returning ffffffff.
Parameter | Description |
---|---|
number | The decimal value to convert. |