1--TEST-- 2assgin to object leaks with ref 3--FILE-- 4<?php 5function &a($i) { 6 $a = "str". $i ."ing"; 7 return $a; 8} 9 10class A { 11 public function test() { 12 $this->a = a(1); 13 unset($this->a); 14 } 15} 16 17$a = new A; 18 19$a->test(); 20$a->test(); 21echo "okey"; 22?> 23--EXPECT-- 24okey 25