title: What is the syntax for accessing PHP object properties?
body: <p><strong>How do you access a PHP object's properties?</strong></p>
  
  <p>Also, what is the difference between accessing an object's property with
  <code>$this-&gt;$property1</code> vs. <code>$this-&gt;property1</code>? </p>
  
  <p>When I try to use <code>$this-&gt;$property1</code> I get the following error: </p>
  
  <blockquote>
    <p>'PHP: Cannot access empty property'. </p>
  </blockquote>
  
  <p>PHP's <a href="http://php.net/manual/en/language.oop5.properties.php" rel="noreferrer">documentation</a> on object properties has one comment which mentions this, but the comment doesn't really explain in depth.</p>