title: PHP | Access to undeclared static property
body: <p>After trying several attempts at this for some reason i get the error <code>Access to undeclared static property</code> when i try to make an object out my class.</p>
  
  <p>My class:</p>
  
  <pre><code>final class repo {
      var $b;
  
      /**
       * @var \Guzzle\Http\Client
       */
      protected $client;
  
      function repo($myvar)
      {
          static::$b = $myvar;
          $this-&gt;client = $b;
      }
  }
  </code></pre>
  
  <p>Me making an object:</p>
  
  <pre><code>$myobj = new repo("test");
  </code></pre>