PHP 4.0 Bug #6191 Updated: Can't return global variable when defined with a dynamic name using eval
| From: | Bug Database | Date: | Wed, 16 Aug 2000 06:54:02 +0000 |
| Subject: | PHP 4.0 Bug #6191 Updated: Can't return global variable when defined with a dynamic name using eval | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-29098@lists.php.net to get a copy of this message | ||
ID: 6191
Updated by: hholzgra
Reported By: smaug@thegame.com
Status: Closed
Bug Type: Scripting Engine problem
Assigned To:
Comments:
a return in an eval() returns from the eval() itself,
not from the calling function
this would do:
function _global($___name) {
eval('global $' . $___name . ';');
return eval('return $' . $___name . ';');
}
Full Bug description available at: http://bugs.php.net/?id=6191