I cannot use IF-THEN-ELSE and $_SERVER variables in PHP class definition
<pre><code>class MY_CONFIG {
    if ( $_SERVER["SERVER_ADDR"] == "127.0.0.1" ) {
        var $default = array( 'foo' =&gt; 1, 'bar' =&gt; 2 );
    } else {
        var $default = array( 'foo' =&gt; 3, 'bar' =&gt; 4 );
    }
}
</code></pre>

<p>I am new to PHP. What's wrong with my code above?</p>

<p>The system keeps saying:</p>

<p>Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in C:\wamp\www\test\class.php on line 4</p>

<p>Thanks.</p>

<p>-- Hin</p>
