Just a total stab into the dark...
You're doing this:
echo "6463334891" ^ "1000212390";
When you want to be doing this:
echo 6463334891 ^ 1000212390;
XOR is an operation on bytes. The byte representation of the integer 6463334891
and the string "6463334891"
are very different. Hence this operation will result in very different values depending on whether the operands are strings or integers. If you get your numbers in string form, cast them to an int
first:
echo (int)$var1 ^ (int)$var2;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…