2
Object test, cyclic references
5
if(!extension_loaded('igbinary')) {
6
echo "skip no igbinary";
15
public function __construct() {
17
$this->children = array();
20
public function addChild(Foo $obj) {
21
$this->children[] = $obj;
22
$obj->setParent($this);
25
public function setParent(Foo $obj) {
32
for ($i = 0; $i < 10; $i++) {
34
$obj1->addChild($obj);
37
$o = igbinary_unserialize(igbinary_serialize($obj1->children));
39
foreach ($obj1->children as $k => $v) {
43
echo gettype($obj_v), "\t", gettype($o_v), "\n";