Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41170 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91893 invoked from network); 16 Oct 2008 22:11:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2008 22:11:03 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:4287] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/27-12818-5FBB7F84 for ; Thu, 16 Oct 2008 18:11:02 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 17 Oct 2008 00:11:21 +0200 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 16 Oct 2008 15:11:17 -0700 Message-ID: <48F7BC05.7060005@zend.com> Date: Thu, 16 Oct 2008 15:11:17 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Greg Beaver CC: PHP Developers Mailing List References: <48F653FF.5010106@chiaraquartet.net> <48F75FA1.7020505@zend.com> <48F7AD03.1050009@chiaraquartet.net> In-Reply-To: <48F7AD03.1050009@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Oct 2008 22:11:17.0760 (UTC) FILETIME=[1CB36800:01C92FDC] Subject: Re: [PHP-DEV] my last attempt at sanity with namespaces From: stas@zend.com (Stanislav Malyshev) Hi! > It does not allow calling both with the same import name, but it does allow: > > namespace blah; > include 'thing1.php'; > include 'thing2.php'; > use class ::foo; > use namespace ::foo as another; > > foo::blah(); // static method > another::blah(); // namespace function > ?> It's basically the same that my proposal does, only you have to work twice as hard (two use's) and remember which name you assigned to what - and you still would have to rewrite the code to use another:: - so you have to both add use's _and_ rewrite the actual call code. And you'd have to do it even if names in class foo have nothing to do with names in namespace foo. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com