class A { var $a = array();
public function makeAReference() { $array = $this->getA(); }
public function &getA() { return $this->a; } }
$A = new A; $A->a = array(1); $A->makeAReference(); $clone = clone $A; $clone->a = array();
print_r($A);
Try it with an without $A->makeAReference()
I sent in a report. Thanks.
On 15 Feb 2004, at 8:04 PM, Marcus Boerger wrote:
Ok, so you are sure var_dump() doesn't show the & for the property in
question? If so i would need to know where exactly the array comes from.
And the best way to proceed tehn is to create a bug report with a short
reproducing script.
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php