ID: 35470
User updated by: prgallier at yahoo dot com
Reported By: prgallier at yahoo dot com
Status: Open
Bug Type: *General Issues
Operating System: Linux 2.6
PHP Version: 5.1.1
New Comment:
Oops...the expected and actual result fields are switched.
Previous Comments:
------------------------------------------------------------------------
[2005-11-29 11:32:20] prgallier at yahoo dot com
Description:
------------
The below code does not store the value "55" in the variable "test" as
it should, and did in PHP 5.0.5. Leaving out the global declaration
allows the output to display properly. I have also had segmentation
faults caused by similar routines, but have been unable to reproduce
this outside of the full program.
Reproduce code:
---------------
$x = array("test", "55");
global ${$x[0]};
${$x[0]} = $x[1];
echo "Test: $test<br>\n";;
Expected result:
----------------
Displays:
Test:
Actual result:
--------------
Should display:
Test: 55
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35470&edit=1