ID: 26307 Updated by: [EMAIL PROTECTED] Reported By: soywiz at hotmail dot com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Windows PHP Version: 4.3.4 New Comment:
RTFM: http://www.php.net/manual/en/language.references.arent.php Previous Comments: ------------------------------------------------------------------------ [2003-11-18 15:58:01] soywiz at hotmail dot com Description: ------------ Within a function a reference to another variable cannot be assigned to its to a global variable. I also proved this example in php 4.3.3 Sorry by my bad english In spanish: Dentro de una función no se le puede asignar a una variable global una referencia a otra variable (también global). He probado este ejemplo en php 4.3.3 y php 4.3.4 Reproduce code: --------------- <?php $a = 'a'; $b = 'b'; function f() { global $a, $b; $b = &$a; // Fails } f(); echo $b; $b = &$a; // Works echo $b; ?> Expected result: ---------------- aa Actual result: -------------- ba ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26307&edit=1