php-src/Zend/tests/assign_to_obj_001.phpt
2018-10-14 19:45:12 +02:00

25 lines
286 B
PHP

--TEST--
assign 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