Re: Is this a missing feature?

From: Date: Sun, 04 Feb 2001 18:40:28 +0000
Subject: Re: Is this a missing feature?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-38130@lists.php.net to get a copy of this message
Lux wrote: > > Where do I make a formal request for a feature? In Perl or Ruby, I > could have said: > > foo ({ 'var1' => 'value', 'var2' => 'value'}); > > and it is so much more elegant than having to say: > > $hash = array ( > 'var1' => 'value', > 'var2' => 'value' > ); > foo ($hash); > > elegance is everything, man. > > lux lux in latin means 'light' right? :) let me enlighten then :-P foo ($hash = array('var1'=>'value', 'var2'=>'value')); should work. Now, I don't undestand why exactly do you need references. By default everything is passed in a referenced manner, if I undestood correct the explanation Zeev wrote right after 4.0 was out, or so. Don't take references like something that will boost your skript speed to 200%. Use them only when you need them, and to find out when you actually need them check out an article on references at zend.com. Now, let me tell you that somehow I agreed with you :) cause I love Python way of dealing with arrays, but we are in PHP, so we have to figure PHP way, not <your-fav-lang> way. ciao -- teodor

« previous php.general (#38130) next »