xref: /PHP-8.1/Zend/tests/bug68191.phpt (revision e919caca)
1--TEST--
2Bug #68191: Broken reference across objects
3--FILE--
4<?php
5
6$obj = new stdClass;
7
8$obj->prop1 = 'abc';
9$obj->prop2 =& $obj->prop1;
10$obj->prop2 .= 'xyz';
11var_dump($obj->prop1);
12
13$obj->prop3 = 1;
14$obj->prop4 =& $obj->prop3;
15++$obj->prop4;
16var_dump($obj->prop3);
17
18?>
19--EXPECT--
20string(6) "abcxyz"
21int(2)
22