title: Is this property call expensive
body: <p>I'm using <code>isset()</code> to check for <code>$this-&gt;statarr['stat1']['stat2'][$var1])</code>. I included only 2 but I have many more. </p>
  
  <pre><code>if (isset($this-&gt;statarr['stat1']['stat2'][$var1])) {
     $value .= 'var 1: ' . $this-&gt;statarr['stat1']['stat2'][$var1];
  }
  if (isset($this-&gt;statarr['stat1']['stat2'][$var2])) {
     $value .= 'var 2: ' . $this-&gt;statarr['stat1']['stat2'][$var2];
  }
  ...
  </code></pre>
  
  <p>Is it expensive to call the <code>$this-&gt;statarr</code> property that many times (10 or more)? Should I call <code>$this-&gt;statarr['stat1']['stat2']</code> once and store it in <code>$statarr</code>, then make the other checks, or it makes no difference in terms of efficiency?</p>
  
  <pre><code>$statarr = $this-&gt;statarr['stat1']['stat2'];
  
  if (isset($statarr[$var1])) {
     $value .= 'var 1: ' . $statarr[$var1];
  }
  if (isset($statarr[$var2])) {
     $value .= 'var 2: ' . $statarr[$var2];
  }
  ...
  </code></pre>
  
  <p>The other thing is how do I make sure that <code>$this-&gt;statarr['stat1']['stat2']</code> itself is set?</p>