Bug #70332 [Opn->Csd]: Wrong behavior while returning reference on object
| From: | laruence@php.net | Date: | Sun, 23 Aug 2015 12:48:43 +0000 |
| Subject: | Bug #70332 [Opn->Csd]: Wrong behavior while returning reference on object | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195441@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70332&edit=1
ID: 70332
Updated by: laruence@php.net
Reported by: laruence@php.net
Summary: Wrong behavior while returning reference on object
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 7.0.0RC1
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f56534e4b93f4c348298c223c95fcca38d95777e
Log: Fixed Bug #70332 (Wrong behavior while returning reference on object)
Previous Comments:
------------------------------------------------------------------------
[2015-08-23 12:21:16] laruence@php.net
Description:
------------
none
Test script:
---------------
<?php
function & test($arg) {
return $arg;
}
$arg = new Stdclass();
$arg->name = array();
test($arg)->name[1] = "xxxx";
var_dump($arg);
Expected result:
----------------
object(stdClass)#1 (1) {
["name"]=>
array(1) {
[1]=>
string(4) "xxxx"
}
}
Actual result:
--------------
object(stdClass)#1 (1) {
["name"]=>
array(0) {
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70332&edit=1