What is Operator Precedence?
Associativity | Operators | Additional Information |
non-associative | clone new | clone and new |
left | [ | array() |
non-associative | ++ -- | increment/decrement |
non-associative | ~ - (int) (float) (string) (array) (object) (bool) @ | 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 |