php-src/Zend/tests/assign_to_obj_001.phpt
2015-04-21 21:04:20 +08:00

25 lines
287 B
PHP

--TEST--
assgin to object leaks with ref
--FILE--
<?php
function &a($i) {
$a = "str". $i ."ing";
return $a;
}
class A {
public function test() {
$this->a = a(1);
unset($this->a);
}
}
$a = new A;
$a->test();
$a->test();
echo "okey";
?>
--EXPECT--
okey