title: Overriding static members in derived classes in PHP
body: <pre><code>&lt;?php
  class Base {
    protected static $c = 'base';
  
    public static function getC() {
      return self::$c;
    }
  }
  
  class Derived extends Base {
    protected static $c = 'derived';
  }
  
  echo Base::getC(); // output "base"
  echo Derived::getC();    // output "base", but I need "derived" here!
  ?&gt;
  </code></pre>
  
  <p>So what's the best workaround?</p>