mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
25 lines
323 B
PHP
25 lines
323 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
|
|
)
|
|
|
|
)
|