{PHP operator}

Source: Internet
Author: User
Tags php operator
Table of Contents operator precedence arithmetic operator +-*/% assignment operator +; + =;. =; The bitwise operator bitwise operator allows for the placement of the bits specified in the integer number. If both the left and right arguments are strings, the bitwise operator will manipulate the ASCII value of the character. Comparison operators allow two values to be compared = = = = = = = = = = = = = = = <> <= >= < > Error control operator PHP supports an error control operator: @. Any error messages that may be generated by the expression are ignored until it is placed in a PHP expression. The Execute operator PHP supports an execution operator: the inverse quotation mark (') increment/decrement operator + + $a +1 after the return value; $a + + returns 1 plus one;--$a; $a--; logical operator! && | | Or nad Xor string operator 2 string operators. 1. ("." ), which returns the string after its left and right arguments are concatenated. 2. (". ="), which attaches the right argument to the left parameter. String type and string function array operator 2 arrays are merged, compared to $ A + $b $a = = $b $a = = = $b $a <> $b $a! = $b type operator instanceof is used to determine whether a PHP variable belongs to a class of CL Instance of the Var_dump: ($a instanceof Notmyclass);

An operator is something that can produce another value (and thus the entire structure as an expression) by giving one or more of the values (in programming jargon, expressions). So you can assume that a function or any struct that returns a value (for example, print) is an operator, and those that do not return a value (such as echo) are something else. There are three types of operators: The first is a unary operator, and only one value is evaluated, for example! (take the inverse operator) or + + (plus one operator). The second is a finite two-tuple operator, which is the majority of the operators supported by PHP. See the following section operator precedence in the list. The third is the ternary operator:?:. It should be used to select one of the other two expressions based on an expression, rather than in two statements or a program route. It's a good idea to put the whole ternary expression in the expansion number.

#第三种是三元运算符, note

                    

  • 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.