Possible Duplicates:
Reference – What does this symbol mean in PHP?
What is the difference between the | and || operators?
Just bumped into this line of code, and I was wondering what is the difference between these two case:
The person who did this do not remember what was the meaning, but it was important.
...
if ($condition1 | $condition2) {
...
...
if ($condition1 || $condition2) {
...
|is a bitwise or,||is a logical or.|operates on binary values whereas||operates on boolean ones.E.g.
5 | 3is0101 OR 0011which is0111which is 7, whereasTrue || Falseis True andFalse || Falseis False.