PHP: Why is the answer to this addition 20 and not 22?

后端 未结 3 1745
南旧
南旧 2020-12-21 02:47

Why is the output to this 20, and not 22? Seeing as you\'re adding 10 + 0xA(which is 10 in HEX) + 2.

$a = 010;
$b = 0xA;
$c = 2;

print $a + $b + $c;

Output         


        
3条回答
提交回复
热议问题