I am using two ways to convert a hexadecimal string to decimal. Using intval function in which I am passing 16 base as the second parameter to convert the hexa decimal string in decimal. same thing I am doing using hexdec built-in function. Both returning different answer.
May I know the reason behind these two function's output?
$a = 'efdebd76';
echo 'intvar : '. intval($a,16);
echo '<br/>';
echo 'hexdec : '.hexdec($a);
Output
intvar : 2147483647
hexdec : 4024352118