title: Private static variables in php class
body: <p>I have a few classes that are often run through <code>var_dump</code> or <code>print_r</code>.</p>
  
  <p>Inside these classes I have a few variables that are references to other, rather large objects that only ever has one instance of each and are only used inside the classes (outside the classes have their own reference to these classes) I do not wish these classes printed in the output, so I have declared them as <code>private static</code> which is working fine.</p>
  
  <p>But my IDE (PHPstorm) is flicking up an error-level alert with <code>Member has private access</code> when I access them through <code>self::$ci-&gt;...</code></p>
  
  <p>I am wondering if this is a bug in the IDE, highlighting because it's probably a bug (aka it's static but nothing outside the class can access it, why would you want to to do that?), or because there is actually something syntactically wrong with it? </p>
  
  <p>As an example here is part of the class,
  Note that <code>=&amp; get_instance();</code> returns a reference to the <a href="https://stackoverflow.com/questions/2703151/what-is-super-object-in-codeigniter">Code Igniter super object</a></p>
  
  <pre><code>private static $ci = null;
  
  public function __construct(){
      self::$ci = self::$ci =&amp; get_instance();
  }
  
  public function product() {
      if ($this-&gt;product == null) {
          self::$ci-&gt;products-&gt;around($this-&gt;relative_date);
          $this-&gt;product = self::$ci-&gt;products-&gt;get($this-&gt;product_id);
      }
      return $this-&gt;product;
  }
  </code></pre>