PHP 4.0 Bug #8100 Updated: extract(), extra feature
| From: | waldschrott@php.net | Date: | Mon, 04 Dec 2000 20:02:06 +0000 |
| Subject: | PHP 4.0 Bug #8100 Updated: extract(), extra feature | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40031@lists.php.net to get a copy of this message | ||
ID: 8100
Updated by: waldschrott
Reported By: joel.jacobson@mobigym.se
Status: Assigned
Bug Type: Feature/Change Request
Assigned To: andrei
Comments:
assigned
Previous Comments:
---------------------------------------------------------------------------
[2000-12-04 14:55:48] waldschrott@php.net
you can easily do...
foreach (array("foo"=>"bar","bar"=>"foo") AS $varname
=> $value) {
$GLOBALS[$varname]=$value; }
but right, it could be handy to have extract()s options
available (extract_type,prefixing)
---------------------------------------------------------------------------
[2000-12-04 14:19:44] joel.jacobson@mobigym.se
It would be nice if you could instruct the extract() function to extract the variables as global
variables. That way one could use the extract() function in functions and make the variables
available outside the function.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8100