title: PHP 5.6.3 Parse error: syntax error, unexpected '[' in class
body: <p>While I was creating a class in php, I experienced this error:</p>
  
  <pre><code>Parse error: syntax error, unexpected '[', expecting ',' or ';' on line 5 
  </code></pre>
  
  <p>A simple example:    </p>
  
  <pre><code>&lt;?php
  
  class MyClass
  {
    public $variable["attribute"] = "I'm a class property!";
  }
  
  ?&gt;
  </code></pre>
  
  <p>I already had a look at <a href="https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php/22316776#22316776">Reference - What does this error mean in PHP?</a> but this doesn't seem to fit to my case. The problem of all other existing Questions seem to rely to an old PHP Version. But I am using PHP 5.6.3!</p>
  
  <p>What can I do? Am I just sightless?</p>