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

				
					<?php
echo hexdec('1e');
?>
				
			

Syntax

				
					hexdec(hex_string)
				
			

Parameter

ParameterDescription
hex_stringSpecifies the hexadecimal string to convert (required)