php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #8100 extract(), extra feature
Submitted: 2000-12-04 14:19 UTC Modified: 2010-12-01 16:22 UTC
From: joel dot jacobson at mobigym dot se Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 4.0.3pl1 OS: Linux 2.4.0-test11
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2000-12-04 14:19 UTC] joel dot jacobson at mobigym dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-04 14:55 UTC] 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)
 [2010-12-01 16:22 UTC] jani@php.net
-Status: Assigned +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues -Assigned To: andrei +Assigned To:
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC