PHP Operators ============= Operator Description Operands Association Level ---------------------------------------------------------------------------------------------------------------------------------------------- NEW Create new object Constructor call Right to left 1 . Property access (dot notation) Objects 2 [ ] Array index Array, integer, or string 2 () Function call Function or argument 2 ! Logical NOT Unary Right to left 3 ~ Bitwise NOT Unary Right to left 3 ++, -- Inc and dec operators lvalue Right to left 3 +, - Unary plus, negation Number Right to left 3 (int) Cast operators Unary Right to left 3 (double) Cast operators Unary Right to left 3 (string) Cast operators Unary Right to left 3 (array) Cast operators Unary Right to left 3 (object) Cast operators Unary Right to left 3 @ Inhibit errors Unary Right to left 3 *, /, % Multiplication, division Numbers 4 +, - Addition, subtraction Numbers 5 . Concatenation Strings 5 <<, >> Bitwise shift left, right Binary 6 <, <=, >, >= Comparison operators Numbers, strings 7 ==, != Equality, inequality Any 8 ===, !== Identity, non-identity Any 8 & Bitwise AND Binary 9 ^ Bitwise NOR Binary 10 | Bitwise OR Binary 11 && Logical AND Boolean 12 || Logical OR Boolean 13 ? : Conditional Boolean Right to left 14 = Assignment lvalue=any Right to left 15 AND Logical AND Boolean 16 OR Logical OR Boolean 17 XOR Logical XOR Boolean 18 Associativity Operators Additional Information ============================================== non-associative new new left [ array() non-associative ++ -- increment/decrement non-associative ~ - (int) (float) (string) (array) (object) @ types non-associative instanceof types right ! logical left * / % arithmetic left + - . arithmetic and string left << >> bitwise non-associative < <= > >= comparison non-associative == != === !== comparison left & bitwise and references left ^ bitwise left | bitwise left && logical left || logical left ? : ternary right = += -= *= /= .= %= &= |= ^= <<= >>= assignment left and logical left xor logical left or logical left , many uses