PHP 4.0 Bug #9453: Reference issue
| From: | mailling at bigfoot dot com | Date: | Mon, 26 Feb 2001 10:07:37 +0000 |
| Subject: | PHP 4.0 Bug #9453: Reference issue | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47534@lists.php.net to get a copy of this message | ||
From: mailling@bigfoot.com
Operating system: Windows 2000
PHP version: 4.0.4pl1
PHP Bug Type: Scripting Engine problem
Bug description: Reference issue
I tried it with: allow_call_time_pass_reference = Off and allow_call_time_pass_reference = On
It seems that the result is not send automatically as a reference
class A{
function &b(&$f) {
$d=&$f;
$f='5';
return $d;
}
}
$c='3';
$d=new A();
$h=$d->b($c);
$h=&$d->b($c); //The & is needed to work well
$h='9';
echo $c. ' '.$h;
The value of c is not updated correctly if we don't ask for a reference
--
Edit Bug report at: http://bugs.php.net/?id=9453&edit=1