<?php
class A {
function __construct($n) { $this->n = $n; }
function init($n) {$this->b = new A ($n);}
}
$a = new A(109);
$b = new A(21);
$a->b =& $b;
unset($b);
$aa = clone $a;
$aa->init(22);
echo $a->b->n;
echo $aa->b->n;
Deprecated: Creation of dynamic property A::$n is deprecated in /in/JODg2 on line 3
Deprecated: Creation of dynamic property A::$n is deprecated in /in/JODg2 on line 3
Deprecated: Creation of dynamic property A::$b is deprecated in /in/JODg2 on line 8
Deprecated: Creation of dynamic property A::$n is deprecated in /in/JODg2 on line 3
2122