How to reach "globals" from inside a class in PHP
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1877136/access-global-variable-from-within-a-class">Access global variable from within a class</a>  </p>
</blockquote>



<p>I got the following code:</p>

<pre><code>
$foo = 'foo';

class bar
{
    public function __construct()
    {
        var_dump($foo);
    }
}

$bar = new bar();

</code></pre>

<p>this results in a NULL value. Is it possible to reach $foo inside the class bar? with some fancy magic word in php?</p>
