{Php operator}

Source: Internet
Author: User
Tags bitwise operators php operator
{Php operator} Table of Contents operator priority arithmetic operator +-*/% value assignment operator +; + =;. =; bit operator allows you to set the specified bit in an integer. If both the left and right parameters are strings, bitwise operators operate on the ASCII value of the character. The comparison operator allows comparison of two values ====! = <><>=<> Error control operator PHP supports an error control operator :@. Before placing the expression in a PHP expression, any error information that may be generated by the expression is ignored. The execution operator PHP supports the following execution operators: the return value after the anchor sign ('') increment/decrease operator + + $ a + 1; $ a ++ returns 1 and adds one; -- $; $ a --; logical operator! & | Or nadxor string operator 2 string operator. 1. ("."), which returns the string after the left and right parameters are connected. 2. (". ="), which attaches the parameter on the right to the parameter on the left. String type and string function array operator 2: whether the array is equal to or not $ a + $ B $ a =$ B $ a ==$ B $ a <> $ B $ a! = $ B type operator instanceof is used to determine whether a PHP variable belongs to an instance of a certain class: var_dump ($ a instanceof NotMyClass );

An operator can generate another value (thus the entire structure becomes an expression) by giving one or more values. Therefore, we can think that the structure of a function or any one that returns a value (such as print) is an operator, while those that do not return a value (such as echo) are other things. There are three types of operators: The first is the unary operator, which calculates only one value, for example! (Inverse operator) or ++ (plus one operator ). The second type is finite binary operators. most operators supported by PHP are like this. For the list, see the next section operator priority. The third is the ternary operator :? :. It should be used to select one expression from the other two expressions, rather than in two statements or program routes. It is a good idea to put the entire ternary expression in the extension.

# The third type is the ternary operator. Note that

                    

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.