php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24291 globals not working right
Submitted: 2003-06-22 16:57 UTC Modified: 2003-06-22 17:02 UTC
From: spagmoid at yahoo dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.3.2 OS: winXP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: spagmoid at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-06-22 16:57 UTC] 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;
}



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-22 16:59 UTC] 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 17:02 UTC] spagmoid at yahoo dot com
I don't find this, where is it?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC