Generic callbacks for Static Variables in PHP
<p>I need a way to access a static variable for a class using a variable as the classname. Due to how PHP handles static methods and inheritance, I need to access the variable itself and not a static function.</p>

<pre><code>class Item
{
   public static $name = 'parent';
}

class SubItem extends item
{
   public static $name = 'child';
}

$classname = 'SubItem';

// This won't work
$value = $classname::$name;

// This obviously won't work either. Not a function.
$value = call_user_func(array($classname, '$name'));
</code></pre>

<p>The nature of how PHP handles static methods, an attempt to define a static method in the class Item will always return "parent" instead of "child" if called for the class SubItem. </p>

<p>I'm assuming there's a way, but my reading hasn't providing anything of use.</p>
