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
Related examples in the same category