Bug #67773 [NEW]: Scope-Resolution Operator

From: Date: Tue, 05 Aug 2014 16:56:20 +0000
Subject: Bug #67773 [NEW]: Scope-Resolution Operator
Groups: php.standards 
Request: Send a blank email to standards-+get-326@lists.php.net to get a copy of this message
From: joelm Operating system: PHP version: Irrelevant Package: PHP Language Specification Bug Type: Bug Bug description:Scope-Resolution Operator Description: ------------ https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#scope-resolution-operator This section makes it sound like class constants and methods and static properties all live in the same namespace (which is wrong, they have distinct namespaces and you can have a method and a class constant with the same name). Also, nothing in this section, other sections, or the syntax rules give enough information allow the reader to distinguish between a ::-style method call expression, a constant access, and a static property access. This is key to describing how a parsed expression involving the :: operator is interpreted by the engine. For example does "C::$x" access a static property of class C named 'x', or does it access a class constant whose name is held in local variable $x? Does "C::$x()" call a method on class C whose name is held in local variable $x, or does it call a callback stored in static property of class C named 'x'? Finally, this section doesn't describe how ::-style method lookup or static property lookup or class constant lookup. For example if there is are multiple static properties named 'x' (possibly with different public/protected/private modifiers), how do we decide which one gets accessed. Same goes for methods. -- Edit bug report at https://bugs.php.net/bug.php?id=67773&edit=1 --

« previous php.standards (#326) next »