PHP 4.0 Bug #4214 Updated: reference variable problem
| From: | Bug Database | Date: | Fri, 21 Apr 2000 06:02:52 +0000 |
| Subject: | PHP 4.0 Bug #4214 Updated: reference variable problem | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18097@lists.php.net to get a copy of this message | ||
ID: 4214
User Update by: zhong_hongye@citiz.net
Status: Open
Bug Type: Scripting Engine problem
Description: reference variable problem
1.I can't get a reference of object's member :
class t{
var $var1;
var $var2;
};
$a1 = new t;
$a1->var2='123';
$p1 = &($a1->var2);
//php report error
$p2 = &$a1->var2;
//$p2 get reference of $a1
2.variables are releaseed uncorrect.
class b{
var $y;
};
class a{
var $x;
function getx(){
$v = new b;
$this->x=&$v;
}
};
$n = new a;
$n->getx();
//$n->x seems not good.
Full Bug description available at: http://bugs.php.net/version4/?id=4214