ID: 12533 Updated by: yohgaki Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Scripting Engine problem Operating System: W2k, Linux PHP Version: 4.0.6 New Comment:
This is explained in the Manual. Please ask support question to php-general. Note: Reference is not a pointer. This is confiuing, but it will not be fixed. Previous Comments: ------------------------------------------------------------------------ [2001-08-02 10:26:44] [EMAIL PROTECTED] <? $a = 1; $b = 2; function Sum() { global $a, $b; $b = &$a; } echo "a=$a b=$b"; ?> I expect echo to output "a=1 b=1" since within Sum I set the variable $b (which refers to global $b) as a reference to $a. However, this works using $GLOBALS instead of the keyword global. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12533&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]