From:             php at simplicate dot it
Operating system: Linux 2.4.22-1.2199 - Apache 2.0
PHP version:      4.3.8
PHP Bug Type:     Variables related
Bug description:  The variable variable doesn't contain the value that logic 
should permit

Description:
------------
When a variable variable is globalized into a function and then its value
is set to a reference of another variable, the variable variable's value
does not extend past that of the function.

Reproduce code:
---------------
$v = 'albert';

function test($var){

        global $$var, $v;

        $$var = &$v;

}

test('mmm');

var_dump($mmm);
exit;

// for further examples follow the link below:
//
http://www.ourproperty.co.uk/test/index.php?code=0&allowin=SECurePHRase808


Expected result:
----------------
string(6) "albert" 

Actual result:
--------------
NULL

-- 
Edit bug report at http://bugs.php.net/?id=31899&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31899&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31899&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31899&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31899&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31899&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31899&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31899&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31899&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31899&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31899&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31899&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31899&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31899&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31899&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31899&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31899&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31899&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31899&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31899&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31899&r=mysqlcfg

Reply via email to