title: How to work with traits and abstract classes in php
body: <p>I am really confused with this and can't really find anything on it.</p>
  
  <p>Take for instance:</p>
  
  <pre><code>&lt;?php
  trait T{
     public static $td;
     public static getTd(){return self::$td;}
     public static setTd($td){self::$td=$td;}
  }
  
  class A{
     use T;
  }
  
  abstract class B{
     use T;
  }
  
  class C extends B{
  
  }
  
  $a=new A;
  $a-&gt;setTd('X');
  echo $a-&gt;getTd();//'X'
  
  echo (new C)-&gt;getTd();//null
  ?&gt;
  </code></pre>
  
  <p>How come the last line is null?</p>