Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76964 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18894 invoked from network); 30 Aug 2014 10:41:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Aug 2014 10:41:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.44 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.215.44 mail-la0-f44.google.com Received: from [209.85.215.44] ([209.85.215.44:65317] helo=mail-la0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/C0-09868-14AA1045 for ; Sat, 30 Aug 2014 06:41:06 -0400 Received: by mail-la0-f44.google.com with SMTP id hz20so3991413lab.3 for ; Sat, 30 Aug 2014 03:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/AQ6Z+8f+DreXI9MB23gZwrF7VdSXBD4qDJWPj6FH1I=; b=bBaGbyM1elQPiPu7TavsM7EpT7TuYHEa4sDSyzrvKo7Fzfio5PK2oczBN0F8beLzmz 0kCvKeJBzzgA4Uq9OyLzHDWQ6zlTxer9tee0DAKMT9pac9+5EqFqRGFL+hOUouKJggsd 6H42xg4z+8n/10hp/1qdkeaBEnD1sYZzy2eUTxx/YsKYqkln9SnSBD4J01qRM/wsz3fs DUO3NJbizJKgcoMWgslWSKTG1LqlAH2xL6QqghTV9wai++fwBiFxSgc5O72dGqSOz/1w 8RrISP2SxMbZJcrRsf+CMQZcwwuJsUpd/UhsNFVoa0UjddBhAZ/cPjw1hja54bXk+Xz2 NgEA== MIME-Version: 1.0 X-Received: by 10.152.28.199 with SMTP id d7mr16629449lah.55.1409395262841; Sat, 30 Aug 2014 03:41:02 -0700 (PDT) Received: by 10.25.154.209 with HTTP; Sat, 30 Aug 2014 03:41:02 -0700 (PDT) In-Reply-To: References: Date: Sat, 30 Aug 2014 12:41:02 +0200 Message-ID: To: Tjerk Meesters Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e0160b432fd697b0501d66710 Subject: Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner From: nikita.ppv@gmail.com (Nikita Popov) --089e0160b432fd697b0501d66710 Content-Type: text/plain; charset=UTF-8 On Sat, Aug 30, 2014 at 2:33 AM, Tjerk Meesters wrote: > Hi internals, > > I would like to propose a few changes to our heredoc / nowdoc scanner to > make it less awkward to use inside other constructs. > > https://wiki.php.net/rfc/heredoc-scanner-loosening > > Let me know your thoughts :) > +1 on removing heredoc/nowdoc restrictions. Having to add a newline after the terminator is very clumsy. We acknowledge this fact by special casing the semicolon, but don't follow through by just removing the requirement. If we allow people to choose their own terminator, they can damn well choose one that causes no conflicts. I mean, what else is the point of this feature? On a technical note, if you go for not removing the restriction entirely, then all characters that are not valid heredoc labels should be allowed afterwards. E.g. your current list misses ) for use in a function call and likely any other number of characters. Nikita --089e0160b432fd697b0501d66710--