标签:
$a=0;
$b=0;
if($a=3||$b=3){ //此时 $a: bool(true), $b: int(0)
$a++; //true加加无效,还是true
$b++;
}
echo$a.”,”.$b; //1,1 类型:bool(true), int(1)
$a=0;
$b=0;
If($a=3|$b=3){ //此时 $a: int(3), $b: int(3)
//将3赋给变量b,然后和前面的3做位或运算,结果赋给a
$a++;
$b++;
}
Echo$a.”,”.$b; 4,4//
标签:
原文地址:http://www.cnblogs.com/dai-idiot/p/4630665.html