php-src/Zend/tests/bug68191.phpt
2014-10-09 12:05:56 +02:00

22 lines
310 B
PHP

--TEST--
Bug #68191: Broken reference across objects
--FILE--
<?php
$obj = new stdClass;
$obj->prop1 = 'abc';
$obj->prop2 =& $obj->prop1;
$obj->prop2 .= 'xyz';
var_dump($obj->prop1);
$obj->prop3 = 1;
$obj->prop4 =& $obj->prop3;
++$obj->prop4;
var_dump($obj->prop3);
?>
--EXPECT--
string(6) "abcxyz"
int(2)