[PHP-BUG] Bug #67773 [NEW]: Scope-Resolution Operator

[email protected] ("[email protected]")
Newsgroups php.standards
Message-ID <[email protected]>
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
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.