Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100440 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43600 invoked from network); 7 Sep 2017 12:54:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2017 12:54:19 -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.223.181 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.223.181 mail-io0-f181.google.com Received: from [209.85.223.181] ([209.85.223.181:33964] helo=mail-io0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/90-10715-A7141B95 for ; Thu, 07 Sep 2017 08:54:18 -0400 Received: by mail-io0-f181.google.com with SMTP id b142so3909943ioe.1 for ; Thu, 07 Sep 2017 05:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9yJ51wvdveZUYb3X3WSD9iPg36FKFOx1qo/jkFHfAcU=; b=RFnlmqdbsoJwKNB9A1nxugik1xA3fHfJZmIqn6wz/FUsK8dOKhiGW8BD3kxXHHj3kq X53p0JMpwGLl6TGW5EJU14nCb2/3RILK8Jx9Fakk8OlLIb/goOZMvDT09cGfQYFwT1jx UdhswvzMiukgBUX5IZgQC7M67LtdGJrozN2WvaJbZVHIdAE0KZ/5AxSpzMPX6Z6I/2qW IChpm8dimkKnjWRQNGD2CyfAplDyN9/jQVD0d3+9iYVmBu434NKaGt2cvWip19WA0SWx PxRuRoGDVKVVekRdkxWvnKVaXhQarLjAxnN5DsvuIiyxpEMQORSqrQKy+kwfnTLMieFC rDNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9yJ51wvdveZUYb3X3WSD9iPg36FKFOx1qo/jkFHfAcU=; b=bjKXIn8HlwPfIMOl8amSODNFFb06FvuK0wGC79NUDJ9lJaIFBuUe5AQUrAUB/0oLyp Hed5l+avIKaiBPhaLVSvMWmsLltA1Yg5uqMWXCaFTT4bfpE3vid7dEAjfjxWJ3pJ2wUQ j3kgH0hHxJ0xyC6+vXp0czOdTk/bTOHjFOpU5RKrWuXhbD+Q9u14kXXWlqP6CI2J49Pp jS9dAR+suSZQog90BHo2D4Q4l0nmnbHOJPCpQbU6K9VrKLxcXCYCG3H2wiUCXK4oa8nF tEFrT6A8NxLKRtaxeZVoFSl3X66FM5kHMY0jRaXTSd0S0Cdrt9FoGbTq1DTvmbjet4/i 3CQw== X-Gm-Message-State: AHPjjUgTLF14jmj3Fv85Je5CfuL49GApxQ0JRPWajNu/riBPqphTpI5c 5H31XL2mnVFmxV7UxhKGlFKJLvUoaA== X-Google-Smtp-Source: AOwi7QD1ZlAo+LIoFgTsnMpXzgM4rv4jGlIhlr0ZQ/yDToTrk3oVmp4TiE514bCY0YK6iooJ8HrtggEQvRA1HcsBbD8= X-Received: by 10.107.70.9 with SMTP id t9mr2824643ioa.292.1504788856012; Thu, 07 Sep 2017 05:54:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.13.3 with HTTP; Thu, 7 Sep 2017 05:54:14 -0700 (PDT) In-Reply-To: <1E.30.10715.1EE31B95@pb1.pair.com> References: <8C.6B.10715.4A4A0B95@pb1.pair.com> <1E.30.10715.1EE31B95@pb1.pair.com> Date: Thu, 7 Sep 2017 14:54:14 +0200 Message-ID: To: Andrea Faulds Cc: PHP internals Content-Type: multipart/alternative; boundary="089e082854783989a1055898f58b" Subject: Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file From: nikita.ppv@gmail.com (Nikita Popov) --089e082854783989a1055898f58b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 7, 2017 at 2:43 PM, Andrea Faulds wrote: > 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 me= an >> 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 =E2=80=9Ccontrol flow=E2=80=9D= 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 ?> an= d > *not* intend output immediately after it. > > So I'm not sure I understand your objection, from that standpoint. Did I > miss something? > > Regards. > I'm referring to code like
Currently this would produce the output
  • Foo
  • Bar
Without the trailing newline elision it would produce
  • Foo
  • Bar
I always assumed that this is the reason why we do this in the first place. Nikita --089e082854783989a1055898f58b--