Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33707 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 516 invoked by uid 1010); 5 Dec 2007 01:33:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 501 invoked from network); 5 Dec 2007 01:33:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2007 01:33:33 -0000 Authentication-Results: pb1.pair.com header.from=steph@zend.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=steph@zend.com; spf=permerror; sender-id=softfail Received-SPF: error (pb1.pair.com: domain zend.com from 64.97.136.154 cause and error) X-PHP-List-Original-Sender: steph@zend.com X-Host-Fingerprint: 64.97.136.154 smtpout0154.sc1.he.tucows.com Solaris 8 (1) Received: from [64.97.136.154] ([64.97.136.154:19771] helo=n082.sc1.he.tucows.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/43-10080-BEFF5574 for ; Tue, 04 Dec 2007 20:33:32 -0500 Received: from sc1-out02.emaildefenseservice.com (64.97.139.2) by n082.sc1.he.tucows.com (7.2.069.1) id 47030A3E005C960D; Wed, 5 Dec 2007 01:33:15 +0000 X-SpamScore: 2 X-Spamcatcher-Summary: 2,0,0,23469a1520914b6a,fee86ee358c62f34,steph@zend.com,-,RULES_HIT:152:355:379:539:540:541:542:543:567:599:601:945:973:988:989:1155:1156:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1541:1587:1593:1594:1676:1711:1730:1747:1766:1792:2073:2075:2078:2379:2393:2559:2562:2895:3027:3353:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:4250:5007:6119:6261,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL: none,DNSBL:none X-Spamcatcher-Explanation: Received: from foxbox (unknown [64.97.206.40]) (Authenticated sender: steph.fox) by sc1-out02.emaildefenseservice.com (Postfix) with ESMTP; Wed, 5 Dec 2007 01:33:34 +0000 (UTC) Message-ID: <064401c836de$e49dde10$e6dfc350@foxbox> Reply-To: "Steph Fox" To: "Stanislav Malyshev" , "Gregory Beaver" Cc: "Derick Rethans" , "PHP Developers Mailing List" References: <4755E492.2080906@chiaraquartet.net> <4755FD27.3030802@zend.com> Date: Wed, 5 Dec 2007 01:33:47 -0000 Organization: Zend Technologies MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] Re: RFC: Dropping Namespace From: steph@zend.com ("Steph Fox") >> 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. I'm truly glad you said that's not a bug, my world just started to make sense again. But Stas, consider (old dialect bc I need to update locally sorry): import nstest::test as whatever; This works in the global space, right? Now along comes, say, Pierre or Derick or Marcus with this class they just have to add to an existing (non-namespaced) core extension, and the obvious and perfect name for this class happens to be 'whatever'. I upgrade PHP and suddenly I start seeing Fatal error: Import name 'whatever' conflicts with defined class in ... Now sure, I can fix that. I can search and replace all my instances of 'whatever' in my code. How is that different from what we had before? Greg would say I should've namespaced this file, I know... but it's possible to use import (OK, 'use' now) in the global space, so how are you going to prevent people from doing that? - Steph