0

我对我的一个脚本使用有点明智

<?php
$num1 = 33554432;
$num2 = 975827238;
if($num2 & $num1){
echo "Yes";
}else{
echo "No";
}
?>

问题是当它应该为否时它会回显是,任何回应将不胜感激

4

1 回答 1

6

33554432 & 97582723833554432,它不是零,所以不,它不应该是否。

  975827238 10 = 111010001010011111000100100110 2 
& 33554432 10 = 000010000000000000000000000000 2
-----------------------------------------------------------
   33554432 10 = 000010000000000000000000000000 2
于 2012-09-18T22:37:25.880 回答