<?php

class MyClassA {
}

class MyClassB {
    public $otherObject;
    public $otherObject2;
}

class MyClassC {
}

$objectA = new MyClassA();
$objectAref2 =& $objectA;
$objectB = new MyClassB();
$objectB->otherObject = $objectA;
$objectB->otherObject2 = $objectA;


meminfo_objects_list(fopen('php://stdout', 'w'));


<?php

class MyClassA {
}

class MyClassB {
}

class MyClassC {
}

$objectA = new MyClassA();
$objectB = new MyClassB();
$objectA2 = $objectA;
$objectA3 = $objectA;

echo " * zval references have been copied\n";
meminfo_objects_list(fopen('php://stdout', 'w'));

$objectARef1 = &$objectA;
$objectARef2 = $objectA;

echo " * objectA turned into object reference\n";
meminfo_objects_list(fopen('php://stdout', 'w'));

Add better examples on object ref and non-ref (zval ref)
Add better examples on object ref and non-ref (zval ref)
