可能的重复:
<<
我知道如何使用它,我知道它用于标记 Heredoc 的语法以轻松打印多行字符串,但是 EOD 缩写词的全名是什么(如果是缩写词)?
我唯一听到的是“End Of Data”,但我不确定这是否好。
Possible Duplicate:
What is the use of <<<EOD in PHP?
I know how to use it, I know it's used to mark Heredoc's syntax to easily print multiple lines of string, but what is full name of that EOD acronym (if it's acronym) ?
Only thing I heard is End Of Data, but I'm not sure if it's good.
发布评论
评论(2)
EOD 不是 Heredoc 语法的一部分。它只是在他们的示例中使用。
此示例会将 javascript 回显给用户(或者换句话说,直到到达令牌 JAVASCRIPT)。
EOD isn't part of the Heredoc syntax. It's just used in their example.
This example would echo the javascript back to the user (or in other words, until the Token JAVASCRIPT is reached).
可以随意选择heredoc标识符:
所以它可能只是意味着“数据结束”以及“爆炸物处理”,但这并不重要,它只是一个标识符,而且它也可能是 _Fo0b4R 和任何其他(有效)标识符一样。
The heredoc identifier can be chosen at will:
So it might just mean "End Of Data" as well as "Explosive Ordnance Disposal", but it doesn't really matter, it's jsut an identifier, and it could as well have been _Fo0b4R as any other (valid) identifier.