mirror of
https://github.com/php/php-src.git
synced 2024-12-15 04:45:03 +08:00
28 lines
330 B
Plaintext
28 lines
330 B
Plaintext
|
--TEST--
|
||
|
Bug #69201 (Memory leak using iterator and get by reference on PHP 7)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class Entity
|
||
|
{
|
||
|
|
||
|
protected $_properties = [];
|
||
|
|
||
|
public function &__get($property)
|
||
|
{
|
||
|
$value = null;
|
||
|
return $value;
|
||
|
}
|
||
|
|
||
|
public function __set($property, $value)
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$e = new Entity;
|
||
|
|
||
|
$e->a += 1;
|
||
|
echo "okey";
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
okey
|