Date: 08/15/00
- Previous message: smaug <email protected>: "[PHP-DEV] PHP 4.0 Bug #6191: Can't return global variable when defined with a dynamic name using eval"
- In reply to: smaug <email protected>: "[PHP-DEV] PHP 4.0 Bug #6191: Can't return global variable when defined with a dynamic name using eval"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Why not do this?
function _global($__name) {
return $GLOBALS[$__name];
}
That works without using global or eval().
-John
At 2:21 +0000 8/16/00, smaug <email protected> wrote:
>this doesn't work:
>
>function _global($___name) {
> eval('global $' . $___name . ';');
> eval('return $' . $___name . ';');
>}
--- John Bafford dshadow <email protected> http://www.dshadow.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Previous message: smaug <email protected>: "[PHP-DEV] PHP 4.0 Bug #6191: Can't return global variable when defined with a dynamic name using eval"
- In reply to: smaug <email protected>: "[PHP-DEV] PHP 4.0 Bug #6191: Can't return global variable when defined with a dynamic name using eval"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

