PHP operators 1. Arithmetic Operators
The PHP arithmetic operators have + (plus),-(minus), * (multiply),/(except),% (remainder).
PHP operator 2. Assignment operators
The PHP assignment operator has + = (assigns the left-hand value to the left),-= (assigns the left-hand value minus the right value to the left), *= (assigns the left-hand value to the left),/= (assigns the left-hand value to the left),%= ( Leave the value on the left to the left),. = (the left string is concatenated to the right to the left).
PHP operators 3. String operators
The PHP string operator has only a connection symbol ".", which connects two strings.
PHP operator 4. Self-increment auto-decrement operator
There are four types of PHP self-decrement operators: $a + +, + + $a, $a--;--$a.
PHP operator 5. logical operators
PHP logical operators have! (logical non), and (logical AND), && (logical AND), or (logical OR, two expressions as long as one is true, the result is true), | | (logical OR), XOR (two expressions have only one is true, the result is true).
and | | Priority is higher than and and OR.
PHP operator 6. Bitwise operators
Bitwise operators are calculated by converting all the numbers into binary numbers.
Bitwise operators have & (bitwise AND), | (bitwise OR), ^ (bitwise XOR), << (bitwise left), >> (bitwise right SHIFT), ~ (bitwise reversed).
PHP operator 7. Relational operators
The relational operators have = = (equals),! = (not equal), < (less than), > (greater than), <= (less than or equal), >= (greater than or equal).
PHP operator 8. Other operators
The PHP operator also has some operators, such as $ (variable symbol), & (variable pointer, fetch address), @ (added before the function, does not display an error message),?:( The trinocular operator),, (comma operator), (method and property of the object), + = (array Assignment).
PHP operator 9. Operator Precedence
The PHP operator has precedence, and a number of operators are prioritized first. The simple understanding is the first multiplication after the addition and subtraction, here no longer repeat.
http://www.bkjia.com/PHPjc/446323.html www.bkjia.com true http://www.bkjia.com/PHPjc/446323.html techarticle PHP operators 1. The arithmetic operator has a PHP arithmetic operator with + (plus),-(minus), * (multiply),/(except),% (remainder). PHP operator 2. Assignment operator The PHP assignment operator has + = (the left value is added to the right ...).