PHP hexdec() Function

The hexdec() function converts a hexadecimal number to a decimal number.

number hexdec ( string $hex_string )

Returns the decimal equivalent of the hexadecimal number represented by the hex_string argument. hexdec() converts a hexadecimal string to a decimal number.

Example -

ParameterDescription
Hex_stringThe hexadecimal string to convert

Return Values

The decimal representation of hex_string