×
Jinxia Li

Heredoc Syntax Error

No Comments

Typing a WHITE SPACE and then RETURN after a PHP heredoc will cause syntax error like below:

You have to enter ‘return’ immediately after a PHP heredoc. Although you cannot tell the difference from the code that with a ‘white space’.

Reference:

https://stackoverflow.com/questions/5416437/syntax-error-unexpected-t-sl

Leave a Comment

Your email address will not be published. Required fields are marked *

By commenting you accept the Privacy Policy