Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:32255 php.internals:32258 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42988 invoked by uid 1010); 11 Sep 2007 14:50:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 42972 invoked from network); 11 Sep 2007 14:50:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2007 14:50:05 -0000 X-Host-Fingerprint: 212.73.129.82 unknown Received: from [212.73.129.82] ([212.73.129.82:4051] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/91-33962-C1BA6E64 for ; Tue, 11 Sep 2007 10:50:05 -0400 To: internals@lists.php.net, RQuadling@GoogleMail.com Message-ID: <46E6AB19.2060300@gmail.com> Date: Tue, 11 Sep 2007 17:50:01 +0300 User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 CC: php-dev References: <10845a340709110731k72b3d5aawf5f4d6fb0262d677@mail.gmail.com> In-Reply-To: <10845a340709110731k72b3d5aawf5f4d6fb0262d677@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 212.73.129.82 Subject: Re: Global namespace? From: emil.vladev@gmail.com (emo) I believe I read somewhere that it will look like this: ::class_b->method_c(); for accessing global scope. Regards, Emil Ivanov Richard Quadling wrote: > Assume for some reason you have an entity in a namespace which has the > same name as something in the global namespace. > > Within the namespace, you wouldn't need to use the namespace prefix > (maybe it has been aliased, subclassed or some other reference). > > How would you access the global namespaced entity? > > For variables, object instances, references, etc., you can use > $GLOBALS[], but if the namespace is going to look like ... > > namespace_a::class_b->method_c(); > > Should there be an alias for global? > > global::class_b->method_c(); > > Or have I missed something? >