mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Clarifying operator precedence docs on meaning of non-associativity and how this affects operator parsing.
Fixes bug #63783 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@329164 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
336bf822a6
commit
95f54b87fd
1 changed files with 6 additions and 1 deletions
|
@ -213,7 +213,12 @@
|
|||
<para>
|
||||
For operators of equal precedence, left associativity means that
|
||||
evaluation proceeds from left to right, and right associativity means
|
||||
the opposite.
|
||||
the opposite. For operators of equal precedence that are non-associative
|
||||
those operators may not associate with themselves. So for example, the
|
||||
statement <literal>1 < 2 > 1</literal>, is illegal in PHP. Whereas,
|
||||
the statement <literal>1 <= 1 == 1</literal> is not, because the
|
||||
<constant>T_IS_EQUAL</constant> operator has lesser precedence than the
|
||||
<constant>T_IS_SMALLER_OR_EQUAL</constant> operator.
|
||||
<example>
|
||||
<title>Associativity</title>
|
||||
<programlisting role="php">
|
||||
|
|
Loading…
Reference in a new issue