php and using composition
<p>So I have the following which errors out but it seems like php should recognize that it only needs only one copy. Should I create this as a reference to remove cirucular instantion of new objects?</p>

<pre><code>&lt;?php
class A {
   public function __construct(){
      echo "within A&lt;br /&gt;";
      $this-&gt;b=new &amp;B();
   }
 }

 class B{
     public function __construct(){
       echo "within B&lt;br /&gt;";
       $this-&gt;a=new A();
 }
}  

$jt=new A();
$ar=new B();
</code></pre>

<p>thx</p>

<hr>

<p>edit - ? could have been asked better. I'm aware of most of issues brought up. Will move to static functions. </p>
