ID:               17052
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jx at email dot cz
-Status:           Duplicate
+Status:           Bogus
 Bug Type:         Documentation problem
 Operating System: Linux
 PHP Version:      4.1.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.

bug #14645



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

[2002-05-06 18:07:20] [EMAIL PROTECTED]

Achja, and it's a documentation problem . . .

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

[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] jx at email dot cz

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


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to