title: Can improper indentation break php code?
body: <p>I am learning php from the user manual. Right now I am looking at the following code:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Untitled Document&lt;/title&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
  &lt;?php
  $str = &lt;&lt;&lt;EOD
  Example of string
  spanning multiple lines
  using heredoc syntax.
  EOD;
  
  /* More complex example, with variables. */
  class foo
  {
      var $foo;
      var $bar;
  
      function foo()
      {
          $this-&gt;foo = 'Foo';
          $this-&gt;bar = array('Bar1', 'Bar2', 'Bar3');
      }
  }
  
  $foo = new foo();
  $name = 'MyName';
  
  echo &lt;&lt;&lt;EOT
  My name is "$name". I am printing some $foo-&gt;foo.
  Now, I am printing some {$foo-&gt;bar[1]}.
  This should print a capital 'A': \x41
  EOT;
  ?&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>As is this code runs as expected and outputs: My name is "MyName". I am printing some Foo. Now, I am printing some Bar2. This should print a capital 'A': A</p>
  
  <p>When I try to indent the php so that it is in front of the body tags the HTML beneath it gets commented out the chrome broswer shows an error:</p>
  
  <p>Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\xampp\phpnotes\index.php on line 39</p>