Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41556 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10243 invoked from network); 29 Oct 2008 14:47:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2008 14:47:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=dave@dmi.me.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dave@dmi.me.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain dmi.me.uk designates 213.171.205.116 as permitted sender) X-PHP-List-Original-Sender: dave@dmi.me.uk X-Host-Fingerprint: 213.171.205.116 unknown Received: from [213.171.205.116] ([213.171.205.116:45014] helo=scaramanga.siterage.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/20-07369-49778094 for ; Wed, 29 Oct 2008 09:47:49 -0500 Received: from localhost (scaramanga.siterage.net [127.0.0.1]) by localhost.akadia.com (SiteRage Mail Server) with ESMTP id EAC71CED2; Wed, 29 Oct 2008 14:47:44 +0000 (GMT) X-Spam-Flag: NO X-Spam-Score: -4.333 X-Spam-Level: X-Spam-Status: No, score=-4.333 required=5 tests=[ALL_TRUSTED=-1.8, AWL=0.065, BAYES_00=-2.599, DNS_FROM_SECURITYSAGE=0.001] Received: from scaramanga.siterage.net ([127.0.0.1]) by localhost (scaramanga.siterage.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Z9TaYmNBQlxI; Wed, 29 Oct 2008 14:47:44 +0000 (GMT) Received: from [192.168.201.2] (ip9.net195-72-173.ci-net.com [195.72.173.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by scaramanga.siterage.net (SiteRage Mail Server) with ESMTPSA id 46793CEBF; Wed, 29 Oct 2008 14:47:44 +0000 (GMT) Message-ID: <4908778F.8020705@dmi.me.uk> Date: Wed, 29 Oct 2008 14:47:43 +0000 User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Josh CC: =?ISO-8859-1?Q?Pawe=3F_Stradomski?= , internals@lists.php.net, Arvids Godjuks References: <6fef9b880810282117v569d3064l752902daaa285a25@mail.gmail.com> <9b3df6a50810282353oaedfde5qf62df50876760170@mail.gmail.com> <200810291001.47422.pstradomski@gmail.com> <49083290.2040104@dmi.me.uk> <6fef9b880810290345p4ddfe6bof62aeb217fd2aab2@mail.gmail.com> In-Reply-To: <6fef9b880810290345p4ddfe6bof62aeb217fd2aab2@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Constants in double-quoted strings From: dave@dmi.me.uk (Dave Ingram) Josh wrote: > Dave, how is a variable name any less a bareword than a constant name? > A bareword (in my opinion) is a word without a sigil (e.g. a leading $), so the way that you would write a constant normally in PHP. What I was trying to say is that having bareword-style interpolation ("{MYCONST}") is much more likely to break BC than the "{#MYCONST}" style. > Thats what the backets were for, perhaps combined with a symbol to > make it even less likely, and of course if the constant is not found > in the symbol table, the constant name would be outputted directly. > But would it raise a warning, as PHP currently does for unrecognised constants? If not, it could be argued that this would make subtle typos harder to spot. Dave