Документ взят из кэша поисковой машины. Адрес оригинального документа : http://old.master.cmc.msu.ru/php/language.operators.precedence.html
Дата изменения: Sun Feb 3 22:33:30 2002
Дата индексирования: Tue Oct 2 13:31:31 2012
Кодировка:
Operator Precedence

Operator Precedence

The precedence of an operator specifies how "tightly" it binds two expressions together. For example, in the expression 1 + 5 * 3, the answer is 16 and not 18 because the multiplication ("*") operator has a higher precedence than the addition ("+") operator. Parentheses may be used to force precedence, if necessary. For instance: (1 + 5) * 3 evaluates to 18.

The following table lists the precedence of operators with the lowest-precedence operators listed first.

Table 10-6. Operator Precedence

AssociativityOperators
left,
leftor
leftxor
leftand
rightprint
left = += -= *= /= .= %= &= |= ^= ~= <<= >>=
left? :
left||
left&&
left|
left^
left&
non-associative== != === !==
non-associative< <= > >=
left<< >>
left+ - .
left* / %
right! ~ ++ -- (int) (double) (string) (array) (object) @
right[
non-associativenew