xref: /PHP-7.1/Zend/tests/bug52879.phpt (revision 8e5b1397)
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();
12$myGlobal->myRef=&$myGlobal;
13$myGlobal->myNonExistentProperty="ok\n";
14echo $myGlobal;
15--EXPECT--
16ok
17