Doc #64270 [Com]: Operator precedence table incomplete

From: Date: Tue, 25 Feb 2014 04:16:33 +0000
Subject: Doc #64270 [Com]: Operator precedence table incomplete
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11016@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64270&edit=1 ID: 64270 Comment by: reinard at reinard dot com Reported by: phpbugs at geniusdex dot net Summary: Operator precedence table incomplete Status: Wont fix Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: I feel that it's actually important to know whether :: or -> has higher precedence. consider: \Namespace::$static_public_object->public_method(); Am I resolving the namespace first on $object or am I looking for a $object in the current context and attempt to call it's method() first? or what about a static method in the above example? \Namespace::$static_public_object::static_public_method(); which scope gets resolved first? Even though the "incorrect" interpretation would probably result in parser errors, there would be no harm in clarifying this for users. Previous Comments: ------------------------------------------------------------------------ [2013-02-27 04:27:54] frozenfire@php.net The mentioned operators are not the same "sort" of operators as those listed in the operator precedence table. It would not provide any benefit to list them there, as they have ultimate precedence in any statement, and no combination of them is both valid and ambiguous. ------------------------------------------------------------------------ [2013-02-21 20:29:00] phpbugs at geniusdex dot net Description: ------------ The table in the documentation containing the operator precedence is incomplete; see http://www.php.net/manual/en/language.operators.precedence.php . For example, the object operator (->), the scope resolution operator (::) and the namespace operator (\) are not included in the table. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64270&edit=1

« previous php.doc.bugs (#11016) next »