title: PHP copy all object properties to this
body: <p>I have an object in PHP, of the type <code>MyObject</code>.</p>
  
  <pre><code>$myObject instanceof MyObject
  </code></pre>
  
  <p>Now, in the <code>class MyObject</code>, there is a non-static function, and in there, I use the reference to "me", like <code>$this</code>, but I also have another object there.</p>
  
  <p>Is it possible, without doing <code>$this = $myObject</code>, to achieve more or less the same effect, like something of the sort <code>set_object_vars($this, get_object_vars($myObject))</code>?</p>