title: PHP property access and dollar sign
body: <p>I have been stepping up my PHP game lately.  Coming from JavaScript, I've found the object model to be a little simpler to understand.</p>
  
  <p>I've run into a few quirks that I wanted some clarifying on that I can't seem to find in the documentation.</p>
  
  <p>When defining classes in PHP, you can define properties like so:</p>
  
  <pre><code>class myClass {
  
      public $myProp = "myProp";
      static $anotherProp = "anotherProp";
  
  }
  </code></pre>
  
  <p>With the public variable of <code>$myProp</code> we can access it using (assuming <code>myClass</code> is referenced in a variable called <code>$myClass</code>) <code>$myClass-&gt;myProp</code> without the use of the dollar sign.  </p>
  
  <p>We can only access static variables using <code>::</code>.  So, we can access the static variable like <code>$myClass::$anotherProp</code> with a dollar sign.</p>
  
  <p>Question is, why do we have to use dollar sign with <code>::</code> and not <code>-&gt;</code>??</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>This is code I would assume would work (and does):</p>
  
  <pre><code>class SethensClass {
  
      static public $SethensProp = "This is my prop!";
  
  }
  
  $myClass = new SethensClass;
  echo $myClass::$SethensProp;
  </code></pre>