note 85861 added to language.namespaces
| From: | greg at chiaraquartet dot net | Date: | Mon, 22 Sep 2008 03:32:26 +0000 |
| Subject: | note 85861 added to language.namespaces | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-144593@lists.php.net to get a copy of this message | ||
the previously submitted note is incorrect.
A::foo();
is identical to
::A::foo();
in the global namespace.
The only way to successfully call the static method is to instantiate A and call it like:
<?php
$a = new A;
$a->foo();
?>
or to use reflection. This limitation is addressed in patches I have proposed, so the
implementation may yet be usable in this regard.
----
Server IP: 209.41.74.194
Probable Submitter: 76.84.4.101
----
Manual Page -- http://www.php.net/manual/en/language.namespaces.php
Edit -- https://master.php.net/note/edit/85861
Del: integrated -- https://master.php.net/note/delete/85861/integrated
Del: useless -- https://master.php.net/note/delete/85861/useless
Del: bad code -- https://master.php.net/note/delete/85861/bad+code
Del: spam -- https://master.php.net/note/delete/85861/spam
Del: non-english -- https://master.php.net/note/delete/85861/non-english
Del: in docs -- https://master.php.net/note/delete/85861/in+docs
Del: other reasons-- https://master.php.net/note/delete/85861
Reject -- https://master.php.net/note/reject/85861
Search -- https://master.php.net/manage/user-notes.php