PHP language basics 03 By ACReaper

Source: Internet
Author: User

03.01 logical operators &, and |, or xor. If we only emphasize one use of and or, remember to add parentheses. Otherwise, errors may occur. I am not very clear about the cause, use &, | as far as possible, and use both in C. Bitwise Operators &, |, ^ The Bitwise Operators in php are also integers. Unless both operators are strings, one of them is converted into an integer instead of an integer. If both operators are strings, in this case, the length is mainly short (except for |, it is mainly long), and the Unit is character (each character is converted to an integer for calculation ). In this way, we can understand that the shorter part is followed by 0 filling, while the & equivalent is the multiplication. Therefore, if we calculate the number of digits in the past, we will give priority to the shorter part, because after the calculation, we need to remove the 0. | Is equivalent to addition operation. Therefore, a long value shall prevail. The incremental string (non-numeric value) of the 03.02.01 string is incremented in the same way as that of perl. Uses a ring queue model. If the last letter is a text or number, add 1 to the last character. If the number exceeds, the system returns to the starting point, for example, 'z' + 1-", 'A' 03.03 error suppression operator @ is used to suppress error information during expression value evaluation. The first type of the 03.04 control structure 03.04.01 if structure is the same as that of the C language. The second type is more:, and endif; as the end if (expr) statement list elseif (expr): statement list else: statement list endif; the switch structure is also the same, the second type is switch: And endswitch; switch (expr ):.... endswitch; matching in the switch in php is performed using =. 03.05 the loop control structure is the same as that in C language.

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.