Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33704 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95183 invoked by uid 1010); 5 Dec 2007 01:21:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95167 invoked from network); 5 Dec 2007 01:21:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2007 01:21:51 -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.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:7688] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/42-10080-D2DF5574 for ; Tue, 04 Dec 2007 20:21:50 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 5 Dec 2007 03:21:46 +0200 Received: from [192.168.16.91] ([192.168.16.91]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 4 Dec 2007 17:21:43 -0800 Message-ID: <4755FD27.3030802@zend.com> Date: Tue, 04 Dec 2007 17:21:43 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Gregory Beaver CC: Derick Rethans , PHP Developers Mailing List References: <4755E492.2080906@chiaraquartet.net> In-Reply-To: <4755E492.2080906@chiaraquartet.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Dec 2007 01:21:43.0308 (UTC) FILETIME=[31E8ECC0:01C836DD] Subject: Re: [PHP-DEV] Re: RFC: Dropping Namespace From: stas@zend.com (Stanislav Malyshev) > However, in the global scope (no namespace) it would fail. This is a > bug that is easily fixed. use should allow re-aliasing of global > classes, and I could provide a very easy fix. This is not a bug - since there you work with test::xmlreader, which of course you can define. But in global space you'd work with existing name xmlreader, which would be redefined. And PHP never allowed redefining classes. > file1.php: > class DB {} > ?> > > file2.php: > import DB as Other_DB; > include 'file1.php'; > class DB extends Other_DB {} > ?> You mean 'use' should kill the old name? I don't think it's a good idea - we'd have to keep track of killed names, and since class can be named in a lot of ways - i.e. if you have name A::B::C::D you can alias any part of name, it would become messy. Why exactly you need to rename existing classes? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com