$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 Apr 18, 2017 优先级不同, or 的优先级比 =(赋值)还低,第二个其实先运行了赋值操作($z = $a )
|
2
holyghost Apr 18, 2017
|
3
gouchaoer Apr 18, 2017
就 wecenter 在用 OR 吧,别的没看见用这个的
|