Possible duplicate:
heredoc with eval code execution
So, I have a function.php function:
eval("\$content = <<<TEMPLATE\n asdf \nTEMPLATE;");
And I get the error message:
Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_END_HEREDOC or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in /var/www/function.php(10) : eval()'d code on line 5
I canβt understand what the problem is. Obviously the heredoc syntax ending, heredoc just don't like playing well with eval?
source share