This article describes the relational operators in PHP && and | | , has a certain reference value, now share to everyone, the need for friends can refer to
These two are the relational operators in PHP. The relational operators in PHP have:&& (and), | | (or), XOR (also or),! (non), the name relationship example results and $x and $y returns True if both $x and $y are true. Or or $x or $y returns true if at least one of the $x and $y is true. XOR $x xor $y returns True if $x and $y have only one true. && $x && $y returns True if both $x and $y are true. | or $x | | $y returns True if at least one of the $x and $y is true. No! $x returns True if the $x is not true. "Annotations" && is the relationship between "and" and "and", two times are true results. | | The relationship of "or", as long as there is a true result is true. (non) is false to true true to false "difficulty" XOR (or) refers to the result that there is only one true whole expression on both sides is true otherwise it is false 1 XOR 1 =false 0 XOR 0 =false 0 XOR 1 =true