mirror of
https://github.com/php/php-src.git
synced 2024-11-26 03:16:33 +08:00
17 lines
356 B
PHP
17 lines
356 B
PHP
--TEST--
|
|
Bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early)
|
|
--FILE--
|
|
<?php
|
|
class MyClass {
|
|
public $myRef;
|
|
public function __set($property,$value) {
|
|
$this->myRef = $value;
|
|
}
|
|
}
|
|
$myGlobal=new MyClass($myGlobal);
|
|
$myGlobal->myRef=&$myGlobal;
|
|
$myGlobal->myNonExistentProperty="ok\n";
|
|
echo $myGlobal;
|
|
--EXPECT--
|
|
ok
|