php-src/Zend/tests/bug70332.phpt
Xinchen Hui f56534e4b9 Fixed Bug #70332 (Wrong behavior while returning reference on object)
This fix is actually made for array acessing bug fix (#70262) which is
discarded since we have another better fix, anyway now seems this is still useful
2015-08-23 20:17:51 +08:00

25 lines
320 B
PHP

--TEST--
Bug #70332 (Wrong behavior while returning reference on object)
--FILE--
<?php
function & test($arg) {
return $arg;
}
$arg = new Stdclass();
$arg->name = array();
test($arg)->name[1] = "xxxx";
print_r($arg);
?>
--EXPECT--
stdClass Object
(
[name] => Array
(
[1] => xxxx
)
)