mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
25 lines
287 B
PHP
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
|