我有两个变量:$a
并且$b
,我想得到它们的 XOR。
$a = bindec('00110111001010000011101000111010');
$b = bindec('00111110001101100011100100101011');
//(11110110111000011111110011101110) <---This is what I want
$c = $a ^ $b;
echo $c = decbin($c);
为什么它给我'1001000111100000001100010001'而不是'11110110111000011111110011101110'?