title: Heredoc and closing tags issue
body: <p>case 1:</p>
  
  <pre><code>&lt;?php    
  echo &lt;&lt;&lt;"FOOBAR"
  Hello World!
  FOOBAR;
  </code></pre>
  
  <p>versus</p>
  
  <p>case 2:</p>
  
  <pre><code>&lt;?php
  echo &lt;&lt;&lt;"FOOBAR"
  Hello World!
  FOOBAR;
  ?&gt;
  </code></pre>
  
  <p>I have a question about heredoc usage.
  I find some weird behavior for which I could use an explanation.</p>
  
  <p>When I try case 1, I do not get the "Hello World!" output printed.
  Instead I see the following parse error.</p>
  
  <pre><code>Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or heredoc end (T_END_HEREDOC) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in C:\xampp\htdocs\test\index.php on line 5
  </code></pre>
  
  <p>However, in case 2, I see it print correctly the text "Hello World!"</p>
  
  <p>This is also true when I remove the closing tag in case 2 and just add an extra line instead.</p>
  
  <p>Can anybody explain the behavior and why it happens?</p>