Is it bad practice or have a significant performance impact to have a cyclical reference? e.g., add object A as property of object B and then Object B as property of Object A?
An example:
<?php
class Object_A {
public function __construct() {
$this->b = new Object_B( $this );
}
public function get_b() {
return $this->b;
}
}
class Object_B {
public function __construct( Object_A $a ) {
$this->a = $a;
}
}
This answer seems to be similar, but for C#.