#24291 [Bgs]: globals not working right

From: Date: Sun, 22 Jun 2003 22:02:03 +0000
Subject: #24291 [Bgs]: globals not working right
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42352@lists.php.net to get a copy of this message
 ID:               24291
 User updated by:  spagmoid at yahoo dot com
 Reported By:      spagmoid at yahoo dot com
 Status:           Bogus
 Bug Type:         Variables related
 Operating System: winXP
 PHP Version:      4.3.2
 New Comment:

I don't find this, where is it?


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

[2003-06-22 16:59:23] derick@php.net

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

.

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

[2003-06-22 16:57:44] spagmoid at yahoo dot com

Description:
------------
globals aren't working right - in repro, no value is echoed

Reproduce code:
---------------
Wang();

function Wang()
{
	global $A, $B;
	
	$A = 3;
	$B = &$A;       // should work, doesn't
//	$GLOBALS["B"] = &$A;      // works
	Chung();
}

function Chung()
{
	global $A, $B;
	
	echo $B;
}




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


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



Thread (3 messages)

« previous php.bugs (#42352) next »