mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
25 lines
286 B
PHP
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
|