#24291 [Opn->Bgs]: globals not working right

From: Date: Sun, 22 Jun 2003 21:59:24 +0000
Subject: #24291 [Opn->Bgs]: globals not working right
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42351@lists.php.net to get a copy of this message
ID: 24291 Updated by: derick@php.net Reported By: spagmoid at yahoo dot com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: winXP PHP Version: 4.3.2 New Comment: 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. . Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#42351) next »