Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100439 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41988 invoked from network); 7 Sep 2017 12:43:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2017 12:43:14 -0000 X-Host-Fingerprint: 95.148.70.109 unknown Received: from [95.148.70.109] ([95.148.70.109:9453] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/30-10715-1EE31B95 for ; Thu, 07 Sep 2017 08:43:13 -0400 Message-ID: <1E.30.10715.1EE31B95@pb1.pair.com> To: internals@lists.php.net References: <8C.6B.10715.4A4A0B95@pb1.pair.com> Date: Thu, 7 Sep 2017 13:43:10 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 95.148.70.109 Subject: Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file From: ajf@ajf.me (Andrea Faulds) Hi Nikita, Nikita Popov wrote: > > It also goes the other way. Whether you want to drop the newline after ?> > depends (roughly) on whether the code is control flow (drop) or trailing > output (don't drop). If the newline is not dropped anymore it doesn't mean > that the output will look nice, it's just going to be broken in a different > way. > I understand that it should be dropped for “control flow” code (maybe not the best term, I misunderstood what you meant at first). That's why I suggest ignoring the following newline only for the ?> at the end of the file, because I can't think of another place where you would have a ?> and *not* intend output immediately after it. So I'm not sure I understand your objection, from that standpoint. Did I miss something? Regards. -- Andrea Faulds https://ajf.me/