$a = false; $b = false; $c = true;
$z = $a || $b || $c; // get true
$a = false; $b = false; $c = true;
$z = $a or $b or $c; // get false
$a = false; $b = false; $c = true;
$z = ($a or $b or $c); // get true
1
jybox 2017 年 4 月 18 日 优先级不同, or 的优先级比 =(赋值)还低,第二个其实先运行了赋值操作($z = $a )
|
2
holyghost 2017 年 4 月 18 日
|
3
gouchaoer 2017 年 4 月 18 日
就 wecenter 在用 OR 吧,别的没看见用这个的
|