Given the following code:
$myString = <<<script . . . script;
Thanks to the answers to the original version of this question, I understand that <<<be the heredoc syntax, treated as double quotes without the need to speed up quotes.
Taking one more step, how is it best to use? In particular, should this make it easier to work with mixed quote strings containing code syntax?
e ..
attribute="name-like string" attribute="property: 'value("value")';"
The idea that this can be useful (if it is implemented as I guess now), especially when it comes to greater complexity and / or in search of code injection. Again, search for any scenarios where heredoc for is especially useful or useful.
string css php heredoc brackets
Garet claborn
source share