Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32891 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80893 invoked by uid 1010); 20 Oct 2007 23:07:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80878 invoked from network); 20 Oct 2007 23:07:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2007 23:07:06 -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:36645] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/8C-03598-91A8A174 for ; Sat, 20 Oct 2007 19:07:06 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 21 Oct 2007 01:07:03 +0200 Received: from [192.168.17.1] ([192.168.17.1]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Sat, 20 Oct 2007 16:06:57 -0700 Message-ID: <471A8A12.3050407@zend.com> Date: Sat, 20 Oct 2007 16:06:58 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Chuck Hagenbuch CC: internals@lists.php.net References: <20071019224202.20245u5zry52h5c8@technest.org> <471A6B32.3080401@zend.com> <20071020172658.1680416b83wxgv6s@technest.org> <471A7C88.6090904@zend.com> <20071020184554.69044keujpgfelus@technest.org> In-Reply-To: <20071020184554.69044keujpgfelus@technest.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Oct 2007 23:06:57.0633 (UTC) FILETIME=[E9E21510:01C8136D] Subject: Re: [PHP-DEV] Order of class resolution with namespaces and autoload From: stas@zend.com (Stanislav Malyshev) > my own namespace. And the fact that changes to what classes PHP provides > can change the order of class resolution seems like unnecessary > fragility to me. I agree that it is not ideal way for all setups, however the alternative is worse - it leads to more problems. > I am not understanding why the extra autoload for system classes is > necessary (I do understand why my initial re-ordering of include rules > would cause two autoload calls and I agree that that is an awful idea now). Because if you say "Exception" inside any namespace, we should check if Foo::Exception not exists anywhere, which means full search of all autoloading possibilities. Only after we ensured that no such class exists anywhere, we might use Exception. Since using system classes is much more frequent than overloading them, performance would greatly suffer each time you use system class name inside namespace. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com