title: usage of __DIR__ in a class
body: <p>I'm writing a very simple PHP application that returns the path of the file with a slight modification.</p>
  
  <p>this is my code:</p>
  
  <pre><code>&lt;?php
  class abc {
  
   private $path = __DIR__ . DIRECTORY_SEPARATOR. 'moshe' . DIRECTORY_SEPARATOR;
  
   function doPath() {
   echo $this-&gt;path;
   }
  
  }
  
  
  $a = new abc();
  $a-&gt;doPath();
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>PHP Parse error:  syntax error, unexpected '.', expecting ',' or ';' in /mnt/storage/home/ufk/1.php on line 4
  
  Parse error: syntax error, unexpected '.', expecting ',' or ';' in /mnt/storage/home/ufk/1.php on line 4
  </code></pre>
  
  <p>for some reason I cannot add connect <strong>__DIR__</strong> using '.' to another string. what am I missing? </p>
  
  <p>using PHP 5.5.13.</p>