Logical operator of PHP basic syntax

Source: Internet
Author: User
Tags bitwise

Baidu Experience | Baidu Know | Baidu Home | Login | Registered
    • News
    • Web page
    • Stick
    • Know
    • Experience
    • Music
    • Image
    • Video
    • Map
    • Encyclopedia
    • Library
    • Home
    • Classification
    • Magazine
    • Task
    • Sign
    • Back to enjoy program
    • Mall
    • Know
Baidu Experience > Maternity/Education > Education > Vocational Education logical Operators for PHP basic syntax
    • |
    • Browse:671
    • |
    • Updated: 2014-05-20 15:02
    • 1
    • 2
    • 3
    • 4
Step through Reading

Logical operators are logical and logical or logical, logical, OR

Method/Step
    1. 1

      And or && logic and

      Returns true if both sides of operands are true, otherwise false is returned

      Example $a and $b

      $a && $b

    2. 2

      OR OR | | Logical OR

      Returns False if both operands are false, otherwise true

      Example $a or $b

      $a | | $b

    3. 3

      Not OR! Logical Non-

      Returns False if the operand is true, otherwise true

      Example not $b

      ! $b

    4. 4

      XOR Logic XOR

      Returns True when both operations have only one true, otherwise false is returned

      Example $a XOR $b

      END
experience content is for reference only, if you need to solve specific problems (especially in the areas of law, medicine, etc.), we recommend that you consult the relevant professionals in detail. Report Author's statement: This experience is based on the actual experience of the original, without permission, declined reproduced. vote (1) few (0) I have questions (0) Exchange of relevant experience
    • PHP basic Syntax bitwise operator 12014.05.21
    • PHP BASIC Syntax structure 02013.11.24
    • Other operators of PHP basic syntax 02014.05.21
    • PHP basic syntax expressions and operator precedence 02014.05.22
    • C Language Programming Logical operator Calculator method 02012.11.17
Related tagsToday spending meta-writing experience Rich >>yywch1 author experience
    • Multi-directional conditional branching structure of PHP Process Control
    • PHP Process Control One-way branch and two-way branch knot ...
    • PHP basic syntax expressions and operator precedence
    • Other operators of PHP basic syntax
    • PHP basic Syntax bitwise operator
••If you want to complain, please go to Baidu Experience Complaint Center, if you want to put forward comments, suggestions, please go to Baidu Experience Management bar feedback. Popular magazines
    • 1th Issue writing skills 543 times share
    • 12th Issue I wish you a "pregnant"281 times share
    • 1th Issue when we have children 186 times share
    • 1th Issue New Term 78 times share
    • 1th Issue dietary guidance for pregnant women 388 Share
2©2015baidu use Baidu before must read Baidu experience agreement author creation Works agreement

Logical operator of PHP basic syntax

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.