Skip to content
Advertisement

In PHP, what does “<<<" represent?

For example:

JavaScript

Advertisement

Answer

That’s heredoc syntax. You start a heredoc string by putting <<< plus a token of your choice, and terminate it by putting only the token (and nothing else!) on a new line. As a convenience, there is one exception: you are allowed to add a single semicolon after the end delimiter.

Example:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement