下面列举一些常见的PHP运算符的优先级,最上面的优先级最高。
new(new运算符,将在后面讲述)
++、--(递增、递减运算符)
*、/、%
+、-、.
&&
||
? : (条件运算符,将在后面讲述)
=(赋值运算符,包含+=、*=、.=等)
and
xor
or
下面列举一些常见的PHP运算符的优先级,最上面的优先级最高。
new(new运算符,将在后面讲述)
++、--(递增、递减运算符)
*、/、%
+、-、.
&&
||
? : (条件运算符,将在后面讲述)
=(赋值运算符,包含+=、*=、.=等)
and
xor
or