Operator Precedence summary table : Operator Precedence : Language Basics PHP Source Code


PHP Source Code » Language Basics » Operator Precedence »

 

Operator Precedence summary table





Operator                Class                 Associativity

new                     Unary                 n/a

[                       Unary                 Right

!                       Unary                 ! and ~ are right associative;
~                                             ++ and-- operators are right or left associative
++ 
-- 
(int
(double
(string
(array
(object)
 @
-------------------------------------------------------------------------------------  
* / %                  Binary                 Left

+ - .                  Binary                 Left

<< >>                  Binary                 Left

< <= > >=              Binary                 n/a

== != === !==          Binary                 n/a

&                      Binary                 Left

^                      Binary                 Left

|                      Binary                 Left

&&                     Binary                 Left

||                     Binary                 Left

?:                     Ternary                Left

=                      Binary                 Left
+= 
-= 
*= 
/= 
.= 
%= 
&= 
|= 
^= 
~= 
<<= 
>>=
  
print                 Unary                    Right

and                   Binary                   Left

xor                   Binary                   Left

or                    Binary                   Left

,                     n/a                      Left
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» Operator Precedence