Appendix O: PHP Operators.

PHP is a programming language capable to resume the most common WebMaster programming languages: PERL, CGI scripts, access to MySQL DB and more.

We list here the most common tables.
 

Precedence
 
Level Operator Description Associativity
01 or, xor, and Low precedence logical or, xor, and Left to right
02 =,+=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>= assignment operators Left to right
03 ||, && logical or, logical and Left to right
04 |, ^ Bitwise or, bitwise xor Left to right
05 &, . Bitwise and, string concatenation  Left to right
06 +,. Addition and subtraction Left to right
07 /, *, % Division, multiplication, modulus Left to right
08 >>, << Shift left, shift right Left to right
09 ++,-- Auto-increment, auto-decrement Left to Right
10 +,-,!,~ Unary plus, unary minus, logical not, bitwaise inversion Right to Left
11 ==, !=, <> Is equal to, is not equal to, is not equal to None
12 <, <=, >, >= Less than, less than or equal to, greater than or equal to None
13 ? : Ternary operator Left to Right
14 -> Class operator Left to Right
15 => Links keys to values in array definition Left to Right

Conditionals
 
 

Operator Description
op1 == op2 Returns true if op1 is equal to op2
For example, 7 == 7 is true
op1 != op2
or
op1 <> op2
Returns true if op1 is equal to op2
For example, 7 == 7 is true