How to Convert hexadecimal to binary in PHP

Convert hexadecimal to binary in PHP- The bindec function returns the decimal equivalent of the binary number represented by the argument. It converts a binary number to an int or, if needed for size reasons, float.

$binary = '1101100010010010';
$decimal = bindec($binary);
echo $binary . ' -> decimal value is: ' . $decimal;