Skip to content

Incorrect highlighting with PHP 7.3 heredoc strings #84

Open
@Riimu

Description

@Riimu

In PHP 7.3, heredoc (and nowdoc) strings can be terminated by the keyword at arbitrary indentation (which is used to strip indentation from previous lines).

For example, the following PHP code works in PHP7.3:

$string = <<<DELIMITER
  Foobar
  DELIMITER;
  
var_dump($string);

and outputs:

string(6) "Foobar"

However, as you can see, the highlighting grammar does not recognize the indented heredoc termination and it parses the var_dump as part of the heredoc string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions