Php (5) PHP operators

Source: Internet
Author: User
Operator Number (PHP) operator symbols are divided into the following functions by operator number: i. arithmetic operators +-* % ++ -- 2. string operators can be called join operators. 3. value assignment operators: = + =-= * = % = 4. operator numbers (PHP) operators can be divided into: 1. arithmetic operators +-*/% + + -- 2. string operators. it can be called join operator number 3, value assignment operator = + =-= * =/= % =. = 4. Comparison operators ><======! = Or <>! = 5. logical operators & and | or! Or not 6, bit operator & | ^ ~ <>>>> 7. Other operators?: ''>->::&$ % Has two purposes: Division operation; control range, do not use decimal places, do not use negative % to convert the numbers on both sides into integers before division. $ A ++; // $ a = $ a + 1; First add 1 + + $ a with the variable; // $ a = $ a + 1; first use auto Increment 1 and then use the variable $ a --; // $ a = $ A-1; first use the variable and then subtract 1 -- $ a; // $ a = $ A-1; first use auto-minus 1 and then use the variable bit operator & (bitwise AND): Set the bitwise of 1 in parameters 1 and 2 to 1, other values are set to 0 | (by bit OR): Set the bits in parameter 1 or parameter 2 to 1, and the remaining values to 0 ^ (by bit or by bit ): set the bits in parameters 1 and 2 to 1, and the same bits to 0 ~ (Not by bit): Set 1 to 0 in the parameter, and 0 to 1 in the parameter <(right shift)> (left shift)

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.