Date: 08/15/00
- Next message: John Bafford: "Re: [PHP-DEV] PHP 4.0 Bug #6191: Can't return global variable when defined with a dynamic name using eval"
- Previous message: Mark Melvin: "Re: [PHP-DEV] PHP 4.0 Bug #5620 Updated: Memory leaks with classes and references to objects"
- Next in thread: John Bafford: "Re: [PHP-DEV] PHP 4.0 Bug #6191: Can't return global variable when defined with a dynamic name using eval"
- Reply: John Bafford: "Re: [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 ]
From: smaug <email protected>
Operating system: Windows 2000 Pro / Apache 1.3.12
PHP version: 4.0.1pl2
PHP Bug Type: Scripting Engine problem
Bug description: Can't return global variable when defined with a dynamic name using eval
this doesn't work:
function _global($___name) {
eval('global $' . $___name . ';');
eval('return $' . $___name . ';');
}
this version does:
function _global($___name) {
eval('global $' . $___name . ';');
eval('$___temp = $' . $___name . ';');
return $___temp;
}
-- 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>
- Next message: John Bafford: "Re: [PHP-DEV] PHP 4.0 Bug #6191: Can't return global variable when defined with a dynamic name using eval"
- Previous message: Mark Melvin: "Re: [PHP-DEV] PHP 4.0 Bug #5620 Updated: Memory leaks with classes and references to objects"
- Next in thread: John Bafford: "Re: [PHP-DEV] PHP 4.0 Bug #6191: Can't return global variable when defined with a dynamic name using eval"
- Reply: John Bafford: "Re: [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 ]

