Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41550 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42218 invoked from network); 29 Oct 2008 10:45:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2008 10:45:32 -0000 Authentication-Results: pb1.pair.com header.from=josh.sickmate@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=josh.sickmate@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.78.27 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: josh.sickmate@gmail.com X-Host-Fingerprint: 74.125.78.27 ey-out-2122.google.com Received: from [74.125.78.27] ([74.125.78.27:59075] helo=ey-out-2122.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/31-48169-BCE38094 for ; Wed, 29 Oct 2008 05:45:32 -0500 Received: by ey-out-2122.google.com with SMTP id 5so1108300eyj.59 for ; Wed, 29 Oct 2008 03:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=/OtSSel1AnO9c0QsxQcRloTkP3noHE4idr+cnhN0wkg=; b=Ii4yj8zENCEKyz/1zBaenvqH3S3c3DmarUsgPqFOpPIpv5WgHNTkuQbWa19rWtSSNH F1uix6JTp94ADSketfznDvco+E0roCF1bWH6jcKG2Ytz3Cp8pjNtInIPIm+o9VZzT1oR SwvDsK4UdEXQwXop8CiH/h7JL74ldR9aPPsgo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=BsGG5ZdaGZma4TsFtOzpVWbODh6iAvbCIfZkRJddfJ4rxhonDRF8s0y3DQ7KSOi8RF pmvhX1x1Ya9WFZRBtzSfWtbglcK7JNuy87svMkHFBIf1QsdWupSAiZ90njl933Zw/T0K 7BT56FwEc1AZawWrUElg1Sz+QPYE4BYGwWhJ8= Received: by 10.210.10.1 with SMTP id 1mr805050ebj.96.1225277129055; Wed, 29 Oct 2008 03:45:29 -0700 (PDT) Received: by 10.210.57.19 with HTTP; Wed, 29 Oct 2008 03:45:29 -0700 (PDT) Message-ID: <6fef9b880810290345p4ddfe6bof62aeb217fd2aab2@mail.gmail.com> Date: Wed, 29 Oct 2008 21:15:29 +1030 To: "Dave Ingram" Cc: "=?ISO-8859-2?Q?Pawe=B3_Stradomski?=" , internals@lists.php.net, "Arvids Godjuks" In-Reply-To: <49083290.2040104@dmi.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6fef9b880810282117v569d3064l752902daaa285a25@mail.gmail.com> <9b3df6a50810282353oaedfde5qf62df50876760170@mail.gmail.com> <200810291001.47422.pstradomski@gmail.com> <49083290.2040104@dmi.me.uk> Subject: Re: [PHP-DEV] Constants in double-quoted strings From: josh.sickmate@gmail.com (Josh) Dave, how is a variable name any less a bareword than a constant name? 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. On Wed, Oct 29, 2008 at 8:23 PM, Dave Ingram wrote: > >> I only worry it could break BC - people might have used "{SOMETEXT}" in >> strings and not expect it to be interpolated (I've done so myself). >> > I've done that a lot, and I've seen quite a bit of templating code that > does the same. > > My personal opinion is that interpolating constants would just lead to > trouble, one way or another. Even something like "{#SOMETEXT}" could be > problematic. I would definitely discourage interpolation without some > sort of sigil though... barewords (in brackets or not) are too likely to > break BC. > > > Dave >