Tech Notes


heredoc syntax
It is very important to note that the line with the closing identifier contains no other characters, except possibly a semicolon (;). That means especially that the identifier may not be indented, and there may not be any spaces or tabs after or before the semicolon. It's also important to realize that the first character before the closing identifier must be a newline as defined by your operating system. This is \r on Macintosh for example. Closing delimiter (possibly followed by a semicolon) must be followed by a newline too.
If this rule is broken and the closing identifier is not "clean" then it's not considered to be a closing identifier and php will continue looking for one.If in this case a proper closing identifier is not found then a parse error will result with the line number being at the end of the script.

A perfect gift from a perfect place