Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32260 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64475 invoked by uid 1010); 11 Sep 2007 15:26:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64460 invoked from network); 11 Sep 2007 15:26:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2007 15:26:27 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:57453] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/25-33962-3A3B6E64 for ; Tue, 11 Sep 2007 11:26:27 -0400 Received: from dhcp-172-28-204-149.zrh.corp.google.com (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 4E56C1B360C; Tue, 11 Sep 2007 17:26:24 +0200 (CEST) Date: Tue, 11 Sep 2007 17:26:23 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <72652296.20070911172623@marcus-boerger.de> To: emo CC: RQuadling@GoogleMail.com, php-dev In-Reply-To: <46E6AB19.2060300@gmail.com> References: <10845a340709110731k72b3d5aawf5f4d6fb0262d677@mail.gmail.com> <46E6AB19.2060300@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Global namespace? From: helly@php.net (Marcus Boerger) Hello emo, Tuesday, September 11, 2007, 4:50:01 PM, you wrote: > I believe I read somewhere that it will look like this: > ::class_b->method_c(); This is the preferred way as it doesn't introduce a new keyword. Also this is inline with other languages. > 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? >> Best regards, Marcus