Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76963 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17310 invoked from network); 30 Aug 2014 10:33:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Aug 2014 10:33:43 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.47 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.47 mail-pa0-f47.google.com Received: from [209.85.220.47] ([209.85.220.47:51087] helo=mail-pa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/70-09868-588A1045 for ; Sat, 30 Aug 2014 06:33:42 -0400 Received: by mail-pa0-f47.google.com with SMTP id hz1so8348210pad.34 for ; Sat, 30 Aug 2014 03:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=piJF9RTU/zvzYY2keLN6WDdoRJelFjj0hS6MmcwcCeQ=; b=sy04hoJpeL+8OSmuG/aPUzyvdgaVHkRzghY2Kb5BtQfsPHdfpipzcUkMe2fEb6ODej pIHdb0EHhv1DUcyJXM4WUvkz0XUt6CxRMCyfHt6+qXV4hDtPm8STykvUyFrhaa7yx0kV B0P4ebu4NCqFqp9GhNgE44iTZVs3gFBlFGwDEjwjw66ojMC2fWq5R8YeIL9b1l7olFF3 EQriFKQnDHwB4FlX4LP5sp1hQVeLOt6vbNfCumIezUIlLUucIgr3PIImhWTYOeURjZn2 GqF9khAJ7lPVqUtwPhkwYJgNv3k51m2XZhlcSBRppyABV1MTFjdNYqrPQQAXmfGJwlnH ppiQ== X-Received: by 10.68.186.33 with SMTP id fh1mr22766608pbc.105.1409394818326; Sat, 30 Aug 2014 03:33:38 -0700 (PDT) Received: from [172.18.15.86] (li745-199.members.linode.com. [106.185.36.199]) by mx.google.com with ESMTPSA id qp15sm2399661pbb.54.2014.08.30.03.33.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 30 Aug 2014 03:33:37 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <54016A45.1010900@sugarcrm.com> Date: Sat, 30 Aug 2014 18:33:29 +0800 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <54016A45.1010900@sugarcrm.com> To: Stanislav Malyshev X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner From: tjerk.meesters@gmail.com (Tjerk Meesters) Hi Stas, On 30 Aug, 2014, at 2:08 pm, Stas Malyshev = wrote: > Hi! >=20 >> I would like to propose a few changes to our heredoc / nowdoc scanner = to make it less awkward to use inside other constructs. >>=20 >> https://wiki.php.net/rfc/heredoc-scanner-loosening >>=20 >> Let me know your thoughts :) >=20 > With this proposal, you will not be able to use the delimiter inside = the > text at the beginning of the line, which is a BC break and may be a > problem for some code. Yes, that=92s also mentioned in the RFC; although it would happen more = easily when restrictions are completely removed, there=92s a slim chance = it would happen with the limited set of valid terminators. That said, I = would like to quote from the RFC itself: [=85] it should be noted that the developer is in complete control of = choosing the name for their enclosures; it's important to choose an = enclosure that doesn't occur naturally inside the quotation. > I'm not sure saving one variable assignment, at > the expense of making scripts less readable and breaking BC, is really > worth it. How often you need an array of heredocs or concatenate two > heredocs? There=92s no real objective measure with which I can answer such = questions :)=20 The closest I could come to a rebuttal is if there=92s no real need to = make the syntax so restrictive, why not make it less restrictive? > How often it is a good idea, readability-wise? >=20 > --=20 > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/