Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39063 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56186 invoked from network); 17 Jul 2008 17:57:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2008 17:57:09 -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.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:17040] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/25-31728-2F78F784 for ; Thu, 17 Jul 2008 13:57:08 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Jul 2008 20:57:34 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Jul 2008 10:57:31 -0700 Message-ID: <487F880B.2090002@zend.com> Date: Thu, 17 Jul 2008 10:57:31 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Greg Beaver CC: Lukas Kahwe Smith , PHP Developers Mailing List , Dmitry Stogov References: <486FA5FB.1000300@php.net> <4872B5D4.1000205@zend.com> <4877CE04.4070104@chiaraquartet.net> In-Reply-To: <4877CE04.4070104@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Jul 2008 17:57:31.0464 (UTC) FILETIME=[9587C480:01C8E836] Subject: Re: towards a 5.3 release From: stas@zend.com (Stanislav Malyshev) Hi! > In other words, with the current implementation, you can just do "use > Foo::Exception;" and it works, but if you *forget* to do the use > statement, you can get unpredictable behavior with no warning until your You get previctable behavior in all cases, there's no randomness in the engine. > to "use ::Exception", then your code is simply slightly slower (1 extra > call to autoload if it exists), but still works properly. It also tilts It's not slightly slower, it's *A LOT* slower - exhaustive search of whole include path for *EACH* call mentioning internal class. That means you have to declare *EACH* internal class - even if no clashes ever existed - for *EACH* use. Basically, it's the same as always using ::Class only implemented in a way that its disastrous effects are hidden until you check performance of your code. Then you have to go back and add use statement for each internal class in each of your files. Lot's of fun that would be. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com