From 95f54b87fd89af76058ae2ab005c1be5bf43c390 Mon Sep 17 00:00:00 2001 From: Sherif Ramadan Date: Wed, 16 Jan 2013 15:56:24 +0000 Subject: [PATCH] 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 --- language/operators.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/language/operators.xml b/language/operators.xml index b6d626180f..b54f061e1c 100644 --- a/language/operators.xml +++ b/language/operators.xml @@ -213,7 +213,12 @@ 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 1 < 2 > 1, is illegal in PHP. Whereas, + the statement 1 <= 1 == 1 is not, because the + T_IS_EQUAL operator has lesser precedence than the + T_IS_SMALLER_OR_EQUAL operator. Associativity