title: Parse error Unexpected (, expected , in php when assign content file to a static property
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10969342/parse-error-syntax-error-unexpected-expecting-or">Parse error: syntax error, unexpected ‘.’, expecting ‘,’ or ‘;’</a>  </p>
  </blockquote>
  
  
  
  <p>I have this class:</p>
  
  <pre><code>&lt;?php
  
  class MyClass {
    const DB_NAME  = "MyDb";
  
    const HOST = "localhost"; 
  
    const USER = "abcdef";
  
    const PASSWORD = "ghijklmn";
  
    public static $MyString = file_get_contents('file.txt');
  
  }
  ?&gt;
  </code></pre>
  
  <p>I have no idea what is wrong with <code>file_get_contents</code> ?</p>
  
  <p>I cannot understand what is the error says ? Why <code>(</code> is unexpected ?</p>
  
  <p>I read the following articles but these don't help me to solve that error:</p>
  
  <p><a href="https://stackoverflow.com/questions/11785017/parse-error-syntax-error-unexpected-t-string-in-php">Parse error: syntax error, unexpected T_STRING in php</a></p>
  
  <p><a href="https://stackoverflow.com/questions/8353629/parse-error-t-variable">Parse error T_Variable</a></p>
  
  <p><a href="https://stackoverflow.com/questions/9720861/file-get-contents-shows-unexpected-output-while-reading-a-file">file_get_contents shows unexpected output while reading a file</a></p>