PHP Operator Precedence

Operator precedence:

Operator precedence refers to the priority of operation performed during the execution of an expression. It implies the priority of the operator during any calculation performed. Following table shows the precedence of different operators in PHP

Description Operator Associativity
Arithmetic operators +,-,*,/,% Left to right
Increment/Decrement ++, -- Right to Left
Assignment Operators =, +=, -=, *=, /=, %= Right to Left
Logical Operators &&, || Left to Right
Logical Operator ! Right to Left
Bitwise Operators |, &, ~, ^, <<, >> Left to Right
Relational Operators <, <=, >, >=, ==, !=, <>, ===, !== Left to Right
Conditional Operator ? : Right to Left
Check Page Rank