1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
--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 ) )