xref: /PHP-5.3/Zend/tests/bug52879.phpt (revision 4d8503a2)
1--TEST--
2Bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early)
3--FILE--
4<?php
5class MyClass {
6	public $myRef;
7	public function __set($property,$value) {
8		$this->myRef = $value;
9	}
10}
11$myGlobal=new MyClass($myGlobal);
12$myGlobal->myRef=&$myGlobal;
13$myGlobal->myNonExistentProperty="ok\n";
14echo $myGlobal;
15--EXPECT--
16ok
17