Re: Is this a missing feature?

From: Date: Sun, 04 Feb 2001 19:24:46 +0000
Subject: Re: Is this a missing feature?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-38138@lists.php.net to get a copy of this message
> > foo ($hash = array('var1'=>'value', > > 'var2'=>'value')); > >should work. > You don't need the $hash in that function call unless you need to use > it later on in your main program, so you can just say: > > foo (array('var1'=>'value', > 'var2'=>'value')); that won't work (Lux's complaint) when foo() is declared function foo (&$hash) cause PHP cannot extract the reference of an array unbound to any PHP variable. There is only one exception, which is for objects created with new. -- teodor

« previous php.general (#38138) next »