PHP - Concatenating 2 objects
<p>I have 2 objects.</p>

<p>Here is the output of the objects when I print them out with <code>print_r</code> method of the PHP.</p>

<p>Oject #1;</p>

<pre><code>stdClass Object ( [id] =&gt; 1 [portal_id] =&gt; 1 [name=&gt; NEVZAT )
</code></pre>

<p>Object #2;</p>

<pre><code>stdClass Object ( [surname] =&gt; YILMAZ)
</code></pre>

<p>I want to concatenate these 2 objects to each other so at the end of the process I need an Object which contains all of the variables of the 2 objects;</p>

<pre><code>stdClass Object ( [id] =&gt; 1 [portal_id] =&gt; 1 [name=&gt; NEVZAT [surname] =&gt; YILMAZ )
</code></pre>
