Using Superglobals for variable variables works
| From: | Michael Virnstein | Date: | Fri, 28 Jan 2005 22:31:55 +0000 |
| Subject: | Using Superglobals for variable variables works | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-14446@lists.php.net to get a copy of this message | ||
Hi PHP-Devs,
i don't know if it is a bug or a new feature of php5. The php manual says, that using superglobals for variable variables isn't working, so something like this shouldn't work:
<?php
$a = 'hello world';
echo ${$_GET['test']};
?>
Actually it does work. Is this intended now? Would be nice, but if it is a simple bug and i can't rely on it to work in the future, i won't use it. Hope it is a feature though. ;)
Regards, Michael