Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixing syntax highlighting issue for flexible HEREDOC and NOWDOC in PHP 7.3 #360
The previous pull request got closed by my mistake as I was trying to force pushing and I couldn't make it open. I'm sorry for that
Description of the Change
As already reported in 346 flexible HEREDOC and NOWDOC as introduced in PHP 7.3 will cause syntax highlighting to be failed.
We can have syntax highlighting to be working even if we use flexible HEREDOC and NOWDOC.
The only change which I made was the regex of HEREDOC and NOWDOC endings, so I do not think any particular issue it might cause. As it is most likely how PHP mechanism will detect the end of these two blocks.
$example = foo( <<<HEREDOC This is just a cool test. HEREDOC, $bar ); $rest_of_the_code = 'hello';
Should now have syntax highlighting to be worked properly.