Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/zend_language_scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -2441,7 +2441,7 @@ inline_char_handler:
RETURN_OR_SKIP_TOKEN(T_COMMENT);
}

<ST_IN_SCRIPTING>"?>"{NEWLINE}? {
<ST_IN_SCRIPTING>"=?>"|("?>"{NEWLINE}?) {
BEGIN(INITIAL);
if (yytext[yyleng-1] != '>') {
CG(increment_lineno) = 1;
Expand Down
6 changes: 6 additions & 0 deletions tests/lang/closing_tag_001.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--TEST--
Closing tag without trailing newline
--FILE--
<?= 'Closing tag' ?> without trailing newline
--EXPECT--
Closing tag without trailing newline
7 changes: 7 additions & 0 deletions tests/lang/closing_tag_002.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--TEST--
Closing tag with trailing newline
--FILE--
<?= 'Closing tag' ?>
with trailing newline
--EXPECT--
Closing tag with trailing newline
8 changes: 8 additions & 0 deletions tests/lang/closing_tag_003.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--TEST--
Closing tag with keeping trailing newline
--FILE--
<?= 'Closing tag' =?>
with keeping trailing newline
--EXPECT--
Closing tag
with keeping trailing newline