Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32617 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25410 invoked by uid 1010); 3 Oct 2007 20:55:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25394 invoked from network); 3 Oct 2007 20:55:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2007 20:55:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:15658] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/10-23822-2A104074 for ; Wed, 03 Oct 2007 16:55:01 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Oct 2007 22:54:54 +0200 Received: from [127.0.0.1] ([192.168.16.180]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 3 Oct 2007 13:49:52 -0700 Message-ID: <4704006E.6040104@zend.com> Date: Wed, 03 Oct 2007 13:49:50 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Greg Beaver , Dmitry Stogov CC: php-dev , Benjamin Schulz References: <4703F1A1.6020906@chiaraquartet.net> In-Reply-To: <4703F1A1.6020906@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Oct 2007 20:49:52.0429 (UTC) FILETIME=[F241CDD0:01C805FE] Subject: Re: [PHP-DEV] a way to fix the import issue From: stas@zend.com (Stanislav Malyshev) > namespace Foo; > import Blah::Exception; > $a = new Exception; > ?> > > should in fact be implicitly importing Blah::Exception as if it were > Foo::Exception, rather than as ::Exception. In other words, I would > actually expect the above code to be equivalent to: > > namespace Foo; > import Blah::Exception as Foo::Exception; > $a = new Foo::Exception; > ?> No, not really. It's equivalent to: There's no class named Foo::Exception and import does not create it. However, I think I see what you were meaning - that new Exception should refer to Blah::Exception. I think it is true. Dmitry, could you look into it? I.e. unqualified lookups inside namespace should also take imports into account. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com