Adding new closing tag =?> for keeping trailing newline
| From: | shinji igarashi | Date: | Sun, 05 Jun 2022 08:23:59 +0000 |
| Subject: | Adding new closing tag =?> for keeping trailing newline | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-117852@lists.php.net to get a copy of this message | ||
Hello everyone,
I'd like to propose adding a new closing tag
=?> to the language.
PHP currently removes the newline character immediately following
the closing tag ?>.
With the new closing tag =?>, the code should look like this:
```
- <?= 1 =?>
- <?= 2 =?>
- <?= 3 =?>
```
and the results it produces would be:
```
- 1
- 2
- 3
```
instead of the following:
```
- 1- 2- 3
```
This addition requires only a one-line modification to the lexer and
doesn't break BC. The proposed patch is here.
https://github.com/php/php-src/pull/8708
Before writing an RFC, I would like to hear your input on whether
it's worth tackling.
Thanks!
--
Shinji Igarashi