Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58795 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67362 invoked from network); 8 Mar 2012 17:22:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2012 17:22:48 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:42010] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/CB-00152-7EAE85F4 for ; Thu, 08 Mar 2012 12:22:48 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id DA3E770003F8; Thu, 8 Mar 2012 17:22:44 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id ztDty1NgZW0d; Thu, 8 Mar 2012 17:22:44 +0000 (WET) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 323D670003F3; Thu, 8 Mar 2012 17:22:43 +0000 (WET) Received: from damnation.mshome.net (damnation-air.nl.lo.geleia.net [IPv6:2001:470:94a2:4:7d06:1af1:ea64:2d52]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 45831201BE04; Thu, 8 Mar 2012 17:22:42 +0000 (WET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net, "Ralph Schindler" References: <4F58DE91.5080606@ralphschindler.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Date: Thu, 08 Mar 2012 18:22:33 +0100 Message-ID: In-Reply-To: <4F58DE91.5080606@ralphschindler.com> User-Agent: Opera Mail/11.61 (Win32) Subject: Re: [PHP-DEV] [RFC] Specify namespace to include file into. From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Thu, 08 Mar 2012 17:51:34 +0100, Michael Morris wrote >> I also don't understand your template argument. Why would you need to >> namespace templates? Typically they are included from inside a function >> (and therefore don't change/access the global namespace). > > You forget that variable scope and namespace scope have absolutely > nothing to do with each other. At all. If I have a template that > needs to call a function from within my project's namespace it must > either use the fully qualified name of the function or it must declare > the namespace it is part of on the first line. Sorry, I confused things here for a moment. This in fact seems to be a valid use case. But you're only saving a line, and you can't rely on the fallback to globals because it would create an ambiguity. -- Gustavo Lopes