Re: Adding new closing tag =?> for keeping trailing newline

From: Date: Tue, 07 Jun 2022 17:27:32 +0000
Subject: Re: Adding new closing tag =?> for keeping trailing newline
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-117868@lists.php.net to get a copy of this message
On 7 Jun 2022, at 16:27, Robert Landers <landers.robert@gmail.com> wrote: > > On Mon, Jun 6, 2022 at 6:47 PM shinji igarashi <shinji.igarashi@gmail.com> wrote: >> >> Hello! >> >> I asked for opinions on reddit also. >> >> https://www.reddit.com/r/PHP/comments/v5le6h/adding_new_closing_tag_for_keeping_trailing/ >> >> Popularity on reddit and acceptance by people with voting rights on internals can be >> different, but it seems that, at least in its current form, this proposal would have a hard time >> winning the vote. >> > > FWIW, I think it makes a lot of sense, having used golang's template language (not > everyone is generating HTML with PHP). I think you may just be dealing with a vocal minority and it > would be worth putting to an actual vote. Even if it fails, we'll learn something the next time > someone wants to change something like this. So long as it's not likely to cause problems, I think <?= $var =?> is a bit easier to read than - <?= $var . PHP_EOL ?> - <?= $var . "\n" ?> - <?php echo $var . "\n" ?> It's of things that probably won't have strong supporters, but might be nice to have (I find some junior developers question why their HTML output can be a bit messy, not that it's really a problem, but it's there). Craig

« previous php.internals (#117868) next »