From:             contact at piry dot net
Operating system: Vista
PHP version:      5.2.11
PHP Bug Type:     Variables related
Bug description:  Variable variables don't work with multi-arrays

Description:
------------
The Variable variables in PHP don't work properly with multi-arrays.
You should be able to display the value from an array key by joining the
multi-array variable and the keys.

Reproduce code:
---------------
$results['rss']['channel']['item'][0]['title'] = "Hello there";

$a = "results";
$b = "['rss']['channel']['item'][0]['title']";

echo ${$a.$b};

Expected result:
----------------
I expect it to display "Hello there";

Actual result:
--------------
Undefined variable: results['rss']['channel']['item'][0]['title'] 

-- 
Edit bug report at http://bugs.php.net/?id=49940&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49940&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49940&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49940&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49940&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49940&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49940&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49940&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49940&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49940&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49940&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49940&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49940&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49940&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49940&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49940&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49940&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49940&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49940&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49940&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49940&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49940&r=mysqlcfg

Reply via email to