Miscellany
public text v1 · immutablefunction &getEach(&$a)
{
if(($elem = current($a)) !== FALSE)
{
$k = key($a);
next($a);
return $a[$k];
}
return false;
}
/*
this is a key function to my entire program....
For obvious reasons, when the function returns false, the Notice goes up: Only variable references should be returned by reference
What could I do to change this while maintaining the usefulness of the function?
*/