Re: Consider only ignoring newlines for final ?> in a file

From: Date: Thu, 07 Sep 2017 12:43:10 +0000
Subject: Re: Consider only ignoring newlines for final ?> in a file
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-100439@lists.php.net to get a copy of this message
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/

« previous php.internals (#100439) next »