title: how to get time from php class?
body: <p>Below is a part of class file:</p>
  
  <pre><code>class Main{
  public time;
  $this-&gt;time = gmdate("Y-m-d H:i:s",time()+21600);
  }
  </code></pre>
  
  <p>But it is showing the following error:</p>
  
  <pre><code>syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/user/folder/Main.php on line 3
  </code></pre>
  
  <p>Would someone tell me how to fix it?</p>