Easy Tutorial
❮ Php Preg_Filter Func String Ord ❯

PHP hexdec() Function

PHP Math Reference Manual

Example

Convert hexadecimal to decimal:


Definition and Usage

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

Note: To convert a decimal number to hexadecimal, see the dechex() function.


Syntax

Parameter Description
hex_string Required. Specifies the hexadecimal string to convert.

Technical Details

Return Value: The decimal value of hex_string.
Return Type: Float / Integer
--- ---
PHP Version: 4+
--- ---
❮ Php Preg_Filter Func String Ord ❯