|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-07 09:35 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 07:00:01 2025 UTC |
Description: ------------ I wonder if the PHP designers could make it possible to apply an array of variable names to the GLOBAL keyword without using a loop. For example: function global_in_here() { $names=array("var1","var2","var3"); global array_to_variable_list($names); # what function would be used here to convert the array to a variable list? } rather than: function global_in_here() { $names=array("var1","var2","var3"); foreach($names AS $name) global $$name; } Thanks, Victor Epand, Owner Krishna Design