php array in class
<p>why does this not work ?</p>

<pre><code>class Test{

  private $vars = array('ALL' =&gt; 0,
                        'ONE' =&gt; 1);

  private $var = $vars['ALL']; // this does not work

  function __construct(){
    $this-&gt;var = $vars['ALL']; // this does work
  }
}
</code></pre>

<p>code example here: <a href="http://codepad.org/QSjHMDij" rel="nofollow">http://codepad.org/QSjHMDij</a></p>

<p>why is the array not accessible in the statement</p>

<pre><code>private $var = $vars['ALL']; // this does not work
</code></pre>
