title: How PHP treats White Spaces
body: <p>I would like to know how php treats white spaces. Reducing a white spaces in my php coding </p>
  
  <ul>
  <li>will reduce the page loading time ?  </li>
  <li>Will reduce empty spaces in my view source ?</li>
  <li>Will reduce my program compiling time ?</li>
  </ul>
  
  <p>Example of my code </p>
  
  <pre><code>&lt;?php 
  include('head.php');
  -- Here is white space --
  include('body.php');
  -- Here is white space --
  include('footer.php');
  ?&gt;
  </code></pre>
  
  <p>inside body.php</p>
  
  <pre><code>&lt;?php 
  
  echo $lhs = '&lt;div class="lhs"&gt;my content&lt;/div&gt;';
  
  
  
     white
  
     spaces..
  
  
  echo $main = '&lt;div class="main"&gt;my content&lt;/div&gt;';
  
     white
  
     spaces..
  
  
  echo $footer ='&lt;div class="footer"&gt;my content &lt;/div&gt;';
  
  ?&gt;
  </code></pre>
  
  <p>My live Coding Part </p>
  
  <pre><code>&lt;?php include('config.php'); ?&gt;
  &lt;!DOCTYPE HTML&gt; 
  &lt;html&gt;
  &lt;?php include(ROOT.'head.php'); ?&gt;
  &lt;body&gt;  
  &lt;div id="container"&gt;        
      &lt;?php
      // header items =&gt; logo , searchbar , compare , myaccount/login
      include(ROOT.'headeritems.php');
      //WEBSITE MENUS
      include(ROOT.'sitemenus.php');    
      if ($page!="index"){ include(ROOT.'otherpagenotification.php'); }
      ?&gt;        
          &lt;div id="breadO" &lt;?php echo ($page!="index")? 'class="bannerShd2"' :''; ?&gt; &gt;
          &lt;div id="bread"&gt;
              &lt;?php include(BREADCRUMBS); ?&gt;
          &lt;/div&gt;
          &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>HTML View Source </p>
  
  <pre><code>1.
  2.
  3.       
  4.    
  5.  &lt;!DOCTYPE HTML&gt; 
  6.  &lt;html&gt;
  7.  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
      &lt;title&gt;Samsung Galaxy Note 3&lt;/title&gt;
      &lt;link rel="shortcut icon" href="favicon.ico" /&gt;
      &lt;meta name="description" content="" /&gt;
      &lt;meta name="author" content="name" /&gt;
  
  &lt;meta name="rating" content="General" /&gt;
  </code></pre>
  
  <p>line number 1 to 4 is the white space like this many are in my view source</p>