Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54150 invoked by uid 1010); 12 Dec 2007 00:04:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54135 invoked from network); 12 Dec 2007 00:04:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Dec 2007 00:04:30 -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:50118] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/C2-38526-D852F574 for ; Tue, 11 Dec 2007 19:04:30 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 12 Dec 2007 02:04:27 +0200 Received: from [192.168.16.91] ([192.168.16.91]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 11 Dec 2007 16:04:23 -0800 Message-ID: <475F2587.5040804@zend.com> Date: Tue, 11 Dec 2007 16:04:23 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: =?ISO-8859-1?Q?David_Z=FClke?= CC: internals@lists.php.net References: <11970653983080000@9866357972520000.9866341568840000> <475BDDF1.7040605@ctindustries.net> <1723341090.20071210220025@marcus-boerger.de> <1197323296.3922.5.camel@sbarrow-desktop> <00A2E2156BEE8446A81C8881AE117F199A0715@companyweb> <475ED038.3080004@zend.com> <7F9E1E02-FF89-474B-9E94-007747B3637A@bitxtender.com> <475EF175.2030304@zend.com> <475F01B1.8090407@zend.com> <31696FA6-ADC3-4853-A5AE-23FA16750B3D@bitxtender.com> <475F10DA.6000909@zend.com> <7ADAF424-D5CC-48F7-AF4C-4D8BC219C1CA@bitxtender.com> <475F1CC5.10505@zend.com> <8FCE962C-288F-44D6-B680-58754038AC85@bitxtender.com> In-Reply-To: <8FCE962C-288F-44D6-B680-58754038AC85@bitxtender.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Dec 2007 00:04:23.0849 (UTC) FILETIME=[8D77E990:01C83C52] Subject: Re: AW: [PHP-DEV] Namespace resolution From: stas@zend.com (Stanislav Malyshev) > Why? I did import Name::Space. According to the current lookup rules, > the first new DateTime() call creates a PHP internal class since > Name::Space::DateTime cannot be found (and autoloading would only be > triggered later), and the second DateTime() call does create > Name::Space::DateTime because by then, it has been autoloaded and thus > can be found in the current namespace. Current namespace in your example is global space. Please reread the docs on what "use" operator does and what "namespace" operator does. I would also recommend avoiding "import" in your examples sine such operator no longer exists. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com