Definition: The Hexdec () PHP Function is used to convert a hexadecimal number into a decimal number. The function will ignore any non-hex characters it encounters. The opposite function Dechex () will convert a decimal into a hexadecimal number.
Also Known As: hexadecimal
Examples:
1
3646
268435455
3453
<?phpThis will return:
echo(hexdec(1) . "<br />");
echo(hexdec(e3e) . "<br />");
echo(hexdec(fffffff) . "<br />");
echo(hexdec(d7d) . "<br />");
?>
1
3646
268435455
3453

