Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41541 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73559 invoked from network); 29 Oct 2008 04:17:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2008 04:17:47 -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 64.233.182.188 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: 64.233.182.188 nf-out-0910.google.com Received: from [64.233.182.188] ([64.233.182.188:11168] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/84-48169-AE3E7094 for ; Tue, 28 Oct 2008 23:17:46 -0500 Received: by nf-out-0910.google.com with SMTP id b11so1227384nfh.13 for ; Tue, 28 Oct 2008 21:17:42 -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:mime-version:content-type:content-transfer-encoding :content-disposition; bh=q/kkxkSAQvhYlOJ9B1Ba7KfVJz1F3YzCKVKKjprfods=; b=nCMyhe3hSnJXzSE9AjkrrJss6KLVEylniTTzRO64mK/GVNbgijTXySFB+an+MkEnV0 xdGFfi3JC/nPlApIW0eqaVtS9w1WkwwFKuk8w0saejNtu8ehJoEeXC9T27kK6dhvsnep HzIubcEOqOah9o+sqea1mQSI/qg8UaG5hp0DY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=cemYT1mGOJ4DLagWZKGkubvLSL03dUCsZ5lNw+q4zMr6ZCvOPzZDIjizoNMBLm1KE5 lwsRhPen4ErsV+dlikePuPrzn6SZeWTfkgWsa7WQSqmVXQfoyg7XkBuJXnIOCdJ5tVGR qQtlpiWX8zAdyJtCYZ5cAhHnoekvlzsv++qwU= Received: by 10.210.119.16 with SMTP id r16mr9349174ebc.190.1225253862684; Tue, 28 Oct 2008 21:17:42 -0700 (PDT) Received: by 10.210.57.19 with HTTP; Tue, 28 Oct 2008 21:17:42 -0700 (PDT) Message-ID: <6fef9b880810282117v569d3064l752902daaa285a25@mail.gmail.com> Date: Wed, 29 Oct 2008 14:47:42 +1030 To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Constants in double-quoted strings From: josh.sickmate@gmail.com (Josh) Hello, What is the chance of support for constants in double-quoted strings in PHP 5.3 or PHP 6.0? This is something I have wanted for some time now. Use cases: Writing an SQL query that makes use of a status field Syntax suggestions: Constants would need to be contained within curly braces. e.g. "SELECT ID, Name FROM Projects WHERE StatusID = {STATUS_ACTIVE} LIMIT {NUM_PER_PAGE} OFFSET {$offset}" The syntax would therefore be: '{', one or more of [-_a-zA-Z0-9], '}' If not constant is found, the string should be inserted directly. If that causes too much parsing issues, perhaps a symbol should be placed before or after the opening brace. e.g. "SELECT ID, Name FROM Projects WHERE StatusID = {#STATUS_ACTIVE} LIMIT #{NUM_PER_PAGE} OFFSET {$offset}" Regards, Josh