What does <<-CONSTANT do?

老子叫甜甜 提交于 2019-11-26 23:12:02

That's a here document. Basically, it's a multi-line string literal.

On lines after the line with the <<-HTML, those are literal strings concatenated by newlines-- until the end marker is reached, which in this case is HTML.

To explicitly answer the question, this snippet returns the string:

<li>

<a href = "some-link">Link-Title</a>

</li>

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!