ID: 17052
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Duplicate
-Bug Type: Performance problem
+Bug Type: Documentation problem
Operating System: Linux
PHP Version: 4.1.2
New Comment:
Achja, and it's a documentation problem . . .
Previous Comments:
------------------------------------------------------------------------
[2002-05-06 18:04:05] [EMAIL PROTECTED]
This is due that variables imported into functions with the global
statement are in fact references. There are open reports about this
issue, marking it as duplicate for now (#14645).
------------------------------------------------------------------------
[2002-05-06 17:46:46] [EMAIL PROTECTED]
this is ok
<?
$a=&$b;
$a=5;
echo($b);
?>
but when I declare these variables as globals in a function it doesn't
work
<?
function foo() {
global $a, $b;
$a=&$b;
}
foo();
$a=5;
echo($b);
?>
It is probably allright. I didn't find anything about this problem.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17052&edit=1