And if you want with PHP 5 an easy way to extract $V by reference, try this :
<?php
foreach ($V as $k => &$v) {
$$k =& $v;
}
?>
It can be used to create special kind of "free args" functions that let you choose when you call them the way you send variables, and which ones. They are moreover very fast to call thanks to references :
<?php
function free_args (&$V) {
foreach ($V as $k => &$v) {
$$k =& $v;
}
unset ($k); unset ($v); unset ($V);
}
$huge_text = '...';
$a = array ('arg1' => 'val1', 'arg2' => &$huge_text); free_args ($a);
?>
Be warned that you can't write : "<?php free_args (array ('arg1' => 'val1')); ?>" because the array can't be referenced by the function, as it's not yet created when the function starts.