可能重複:
Reference - What does this symbol mean in PHP?
What is the difference between the | and || operators?Php:|有什麼區別?和||運營商
就撞上了這行代碼,我想知道的是這兩個案例的區別:
的做這個的人不記得是什麼意思,但這很重要。
... if ($condition1 | $condition2) { ...
... if ($condition1 || $condition2) { ...
請參見參考 - 此符號在PHP中的含義是什麼?(http://stackoverflow.com/questions/3737139/reference-what-does-this-symbol-mean-in-php) – BoltClock 2011-03-22 16:01:19
http://stackoverflow.com/questions/2233835/what-is-the-difference-between-the-and-operators – 2011-03-22 16:02:00
http://php.net/manual/en/language.operators.php – 2011-03-22 16:02:21