The dechex() function converts decimal to hexadecimal. It Returns the hexadecimal string of the specified decimal.
Syntax
dechex(num)
Parameters
num − The decimal value to be converted
Return
The dechex() function Returns the hexadecimal string of the specified decimal.
Example
<?php echo dechex("15") . "<br>"; echo dechex("1990"); ?>
Output
f<br>7c6