Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40416 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6665 invoked from network); 9 Sep 2008 16:38:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2008 16:38:02 -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:18350] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/08-23799-966A6C84 for ; Tue, 09 Sep 2008 12:38:02 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 9 Sep 2008 19:39:10 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 9 Sep 2008 09:39:07 -0700 Message-ID: <48C6A6AA.7050003@zend.com> Date: Tue, 09 Sep 2008 09:39:06 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Greg Beaver CC: internals@lists.php.net References: <48C59D5C.4050507@chiaraquartet.net> <48C5A909.4030502@zend.com> <48C602D5.6020704@chiaraquartet.net> In-Reply-To: <48C602D5.6020704@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 Sep 2008 16:39:07.0183 (UTC) FILETIME=[93DDF3F0:01C9129A] Subject: Re: [PATCH] Re: [PHP-DEV] namespace examples (solving name resolution order issues) From: stas@zend.com (Stanislav Malyshev) Hi! > a use statement. For those who aren't clear on what Stas is saying, > here is the better example: > > namespace PEAR2::Pyrus::PackageFile::v2Iterator; > use namespace::File, namespace::FileAttribsFilter, namespace::FileContents; > ?> No, actually that's not what I meant. You can do this too, but I meant just use namespace::File. There's no law about using :: in the code, really. Just write namespace::File, it's both short and clear. > Now for the good news. The reason it is so slow is that the autoload is > called for every single invocation of the class name. With the patch at > http://pear.php.net/~greg/resolution_fix.patch.txt this performance is What this patch does? > Now that the performance hit is minimal, can we agree to get along on > this proposed change Stas? ;) It transforms the critical nature of the > problem to a truly minor performance hit on internal class usage without > use or ::. Please read my response to your previous email, I have described there issues with your proposal and how to make it non-contradictory and what else needs to be done. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com