Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32897 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90524 invoked by uid 1010); 20 Oct 2007 23:42:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90509 invoked from network); 20 Oct 2007 23:42:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2007 23:42:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=chuck@horde.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chuck@horde.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain horde.org designates 66.92.78.250 as permitted sender) X-PHP-List-Original-Sender: chuck@horde.org X-Host-Fingerprint: 66.92.78.250 dsl092-078-250.bos1.dsl.speakeasy.net Received: from [66.92.78.250] ([66.92.78.250:50865] helo=technest.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/8E-03598-C529A174 for ; Sat, 20 Oct 2007 19:42:20 -0400 Received: by technest.org (Postfix, from userid 33) id 6D4747F00D; Sat, 20 Oct 2007 19:42:17 -0400 (EDT) Received: from tatiana (tatiana [192.168.1.2]) by technest.org (Horde Framework) with HTTP; Sat, 20 Oct 2007 19:42:17 -0400 Message-ID: <20071020194217.98794nbyt3bwrlnk@technest.org> Date: Sat, 20 Oct 2007 19:42:17 -0400 To: Stanislav Malyshev 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> <471A8A12.3050407@zend.com> <20071020191948.19935z9hoqcn9c84@technest.org> <471A9049.1020408@zend.com> In-Reply-To: <471A9049.1020408@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.2-cvs) Subject: Re: [PHP-DEV] Order of class resolution with namespaces and autoload From: chuck@horde.org (Chuck Hagenbuch) Quoting Stanislav Malyshev : >> But you shouldn't even look for Exception then. I'm saying that if >> you want the global Exception class you should import it. > > That would be double bad - that means you have to go over all your > code and add :: to all instances of global classes, even though you > never ever intended to override any of them. I don't think it's a > good idea. No, you just have to import them into your namespace, right next to the namespace declaration. Which solves both problems - ease of using global classes and the extra autoload. Honestly I don't know if having a PHP:: namespace with an alias to the builtin classes is feasible, but if it is, then the simple, "put global classes into my namespace" ("register_globals" ;) option is: namespace Test; import PHP; -chuck