title: Access a static variable by $var::$reference
body: <p>I am trying to access a static <em>variable</em> within a class by using a variable class name.  I'm aware that in order to access a <em>function</em> within the class, you use <code>call_user_func()</code>:</p>
  
  <pre><code>class foo {
      function bar() { echo 'hi'; }
  } 
  $class = 'foo';
  call_user_func(array($class, 'bar')); // prints hi
  </code></pre>
  
  <p>However, this does not work when trying to access a static <em>variable</em> within the class:</p>
  
  <pre><code>class foo {
      public static $bar = 'hi';
  } 
  $class = "foo";
  call_user_func(array($class, 'bar')); // nothing
  echo $foo::$bar; // invalid
  </code></pre>
  
  <p>How do I get at this variable? Is it even possible? I have a bad feeling this is only available in PHP 5.3 going forward and I'm running PHP 5.2.6.</p>