psalm icon indicating copy to clipboard operation
psalm copied to clipboard

HEREDOC syntax error

Open carp3 opened this issue 6 years ago • 2 comments

Hello, psalm is throwing error for a valid PHP file:

.
.
        return <<<HAVING
        HAVING
                min(a) >= '{$this->getStartDate()->format('Y-m-d')}' AND
                max(b) < '{$this->getEndDate()->format('Y-m-d')}'
HAVING;
.
.

Error:

ERROR: ParseError - ......../Report.php:116:17 - Syntax error, unexpected T_STRING, expecting ';' on line 116 (see https://psalm.dev/173)
                                min(a) >= '{$this->getStartDate()->format('Y-m-d')}' AND

sandbox link: https://psalm.dev/r/e01590ee87

carp3 avatar Sep 07 '20 15:09 carp3

This code is not valid PHP

muglug avatar Sep 07 '20 15:09 muglug

(since PHP 7.3: https://3v4l.org/VAFVj)

muglug avatar Sep 07 '20 15:09 muglug