Relational operators in PHP && and | |

Source: Internet
Author: User
Tags true true
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.