#32955 [NEW]: Variable variables in globals.
| From: | isset at yandex dot ru | Date: | Thu, 05 May 2005 12:39:56 +0000 |
| Subject: | #32955 [NEW]: Variable variables in globals. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-78653@lists.php.net to get a copy of this message | ||
From: isset at yandex dot ru
Operating system: Windows, Linux
PHP version: 5.0.4
PHP Bug Type: Reproducible crash
Bug description: Variable variables in globals.
Description:
------------
Variable variables in globals. Crash. See reproduce code.
Reproduce code:
---------------
<?php
$var[1] = "user";
$var[2] = "name";
function check($var)
{
global $$var[1][$var[2]]; // <- Segmentation fault
echo $$var[1][$var[2]];
}
check($var);
?>
--
Edit bug report at http://bugs.php.net/?id=32955&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32955&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32955&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32955&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32955&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32955&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32955&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32955&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32955&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32955&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32955&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32955&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32955&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32955&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32955&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32955&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32955&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32955&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32955&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32955&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32955&r=mysqlcfg