diff --git a/language/operators.xml b/language/operators.xml index e561af94c8..81b1f589c9 100644 --- a/language/operators.xml +++ b/language/operators.xml @@ -439,9 +439,12 @@ echo "Should be 4: " . $a . "<br>\n"; 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. + 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 @@ -479,8 +482,8 @@ echo "Should be 4: " . $a . "<br>\n"; left - = += -= *= /= .= %= &= |= ^= ~= <<= >>= - + = += -= *= /= .= %= &= |= ^= ~= <<= >>= + left