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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
33 - 26 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC