title: About error "Attempt to modify property of non-object"
body: <p>Can anyone tell me why the following code will have different results ?</p>
  
  <p>unset object property</p>
  
  <pre><code>$s = new StdClass;
  unset($s-&gt;a-&gt;b);    //it is working fine
  unset($s-&gt;x-&gt;y-&gt;z); //it is got an error: Attempt to modify property of non-object
  </code></pre>
  
  <p>unset array index</p>
  
  <pre><code>$a = array();
  unset($a[1][2]);    //it is working fine
  unset($a[3][4][5]); //it is working fine
  </code></pre>