PHP Dechex () Function

PHP

Syntax:
string dechex ($value)
Parameters:this function takes one parameter $value. This is the decimal number you want to convert to hexadecimal.Return Value:returns the hexadecimal string representation of the number passed to it as an argument.Examples:
Input: dechex (10) Output: a Input: dechex (47) Output: 2f Input: dechex (4294967295) Output: ffffffff
The following programs illustrate the dechex() function in PHP :
  • Pass 10 as a parameter: php 
    echo dechex (10);  
    ?>
    Output:
    a
  • Passing 47 as a parameter: php  
    echo dechex (47);  
    ?>
    Output:
    2f
  • When the maximum possible decimal number is passed as a parameter: php 
    echo dechex (4294967295);  
    ?>
    Output:
    ffffffff
Link :
http: //php.net/manual/en/function.dechex.php