title: PHP Access to Undeclared Static Property
body: <p>I've made a class in PHP and I'm getting a Fatal Error(Title) on the line marked with an asterisk(*)</p>
  
  <pre><code>class monster{
      private $id = 0;
      private $name = "";
      private $baseLevel = 0;
      private $attack = 0;
      private $defense = 0;
      private $baseEXP = 0;
      private $dropType = 0;
      private $dropNum = 0;
      function __construct($a, $b, $c, $d, $e, $f, $g, $h){
      *   self::$id=$a;
          self::$name = $b;
          self::$baseLevel = $c;
          self::$attack = $d;
          self::$defense = $e;
          self::$baseEXP = $f;
          self::$dropType = $g;
          self::$dropNum = $h;
      }
  }
  </code></pre>
  
  <p>I can't figure out what's causing it, also, the following class(same file) is returning the same error.</p>
  
  <pre><code>class item{
      private $id = 0;
      private $name = "";
      private $type = 0; #0-weapon, 1-armor, 2-charm, 3-ability
      private $ability = 0;
      private $desc = "";
      private $cost = 0;
      function __construct($a, $b, $c, $d, $e, $f){
          self::$id=$a;
          self::$name=$b;
          self::$type=$c;
          self::$ability=$d;
          self::$desc=$e;
          self::$cost = $f;
      }
  }
  </code></pre>
  
  <p>Do you happen to know what's causing the error or how I can fix it?</p>