Heredoc: what does the commonly used 'EOT' actually mean?

Aron Rotteveel picture Aron Rotteveel · Mar 10, 2011 · Viewed 15.5k times · Source

PHP's Heredoc examples always seem to use EOT (and sometimes EOD) as the seperating string, while it is actually possible to use any string here. This works:

$mystring = <<<EOT
     Foo
     Bar
     Baz
EOT;

While this works as well:

$mystring = <<<MONKIES
     Foo
     Bar
     Baz
MONKIES;

Does EOT actually stand for something and if so, what?

Answer

Ignacio Vazquez-Abrams picture Ignacio Vazquez-Abrams · Mar 10, 2011

​It stands for "End Of Text".​