general function question
Posted: Wed Oct 10, 2007 10:35 am
why does this function have an ampersand at the beginning of its name?
Code: Select all
function &varSession($name)A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
function &varSession($name)Code: Select all
function &varSession($name)
{
global $sessionPrefix;
return unmagic_quote_gpc($_SESSION[$sessionPrefix.$name]);
}whats the benifit?feyd wrote:Probably because the function being called internally returns a reference.