Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100446 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55861 invoked from network); 7 Sep 2017 14:23:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2017 14:23:04 -0000 X-Host-Fingerprint: 95.148.70.109 unknown Received: from [95.148.70.109] ([95.148.70.109:16194] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/E2-10715-84651B95 for ; Thu, 07 Sep 2017 10:23:04 -0400 Message-ID: <89.E2.10715.84651B95@pb1.pair.com> To: internals@lists.php.net References: <8C.6B.10715.4A4A0B95@pb1.pair.com> Date: Thu, 7 Sep 2017 15:23:01 +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: 7bit 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, Michael Morris wrote: >> >> >> Would anyone object to me changing how PHP handles this so that only the >> final ?> tag consumes its following newline, and only at the end of the >> file? >> >> > Captain Obvious here. It has long been the policy of many large PHP > projects to not close the last PHP tag for this reason. This change > wouldn't affect them. It risks affecting projects without this policy, and > those tend to be older and often private. > The idea here though is not to affect code where the entire file is a block. If newlines are still consumed, but only for ?> at the end of the file, those files should still behave the same. What I want to change is how it behaves in other circumstances, i.e. templating. Thanks. -- Andrea Faulds