title: </script> in PHP heredoc
body: <p>Why I am not able to end a javascript inside a PHP heredoc?</p>
  
  <p>The rest of the code below this line:</p>
  
  <pre><code>&lt;/script&gt; 
  </code></pre>
  
  <p>become not part of PHP's code. They become HTML code.</p>
  
  <p>It is like the end script code ends the PHP block.</p>
  
  <pre><code>$headerContent = &lt;&lt;&lt;HEAD
      &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
      &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"&gt;
      &lt;head&gt;
      &lt;title&gt;$title&lt;/title&gt;
      &lt;meta http-equiv="content-type" content="text/html; charset=iso-8859-2" /&gt;
  
      &lt;script&gt;
      &lt;/script&gt; // Here is the problem
      &lt;/head&gt; // code here and below becomes not part of PHP.
      &lt;body&gt;
      .
      . 
      .
  HEAD;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Fci7o.png" alt="screenshot for better view"></p>
  
  <p>Any tips for solving this problem?</p>