PHP: dechex() function
Description
The dechex() function is used to convert a decimal number to a hexadecimal number.
Version:
(PHP 4 and above)
Syntax:
dechex(num)
Parameter:
Name | Description | Required / Optional |
Type |
---|---|---|---|
num | The decimal number to convert. | Required | Integer |
Return value:
Hexadecimal string representation of num.
Value Type: String.
Pictorial Presentation
Example:
Output:
Hexa value of 120 is 78 Hexa value of 7 is 7 Hexa value of 9899 is 26ab
See also
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics