ID:               26798
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ilia at manual dot ru
-Status:           Open
+Status:           Bogus
 Bug Type:         Variables related
 Operating System: Windows XP,Linux
 PHP Version:      4.3.4
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php




Previous Comments:
------------------------------------------------------------------------

[2004-01-05 14:27:28] ilia at manual dot ru

Description:
------------
The script should output '1', but it outputs '0'.
Looks like the assignment is made locally.

But if I replace '$a =& $b' with '$GLOBALS['a'] =& $b'
the script will output '1' (right behaviour)


Reproduce code:
---------------
$b=1;
$a=0;

function f()
{
    global $a,$b;
    
    $a =& $b;
}

f();
echo $a;

Expected result:
----------------
1

Actual result:
--------------
0


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26798&edit=1

Reply via email to