PHP 7.4 | Tokenizer/PHP: handle PHP tag at end of file consistently #937
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Prior to PHP 7.4, a PHP open tag at the end of a file was not tokenized correctly in PHP itself.
From the PHP 7.4 changelog:
This commit makes the tokenization of PHP open tags at the end of a file consistent in all PHP versions.
Includes tests.
Includes adding a few extra test builds which test with
short_open_tag=On
for various PHP versions.Refs:
Suggested changelog entry
Tokenizer/PHP: a PHP open tag at the very end of a file will now always be tokenized as
T_OPEN_TAG
, independently of the PHP version.