Re: [PHP] Is this a missing feature?

2001-02-04 Thread Christian Reiniger
On Sunday 04 February 2001 07:31, John Luxford wrote: function foo ($hash) { while (list ($k, $v) = each ($hash)) { echo "$k :: $vbr /\n"; } } // but what I want to say is something like this foo (["one" = "value", "two" = "value"]); foo () is

Re: [PHP] Is this a missing feature?

2001-02-04 Thread Teodor Cimpoesu
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

Re: [PHP] Is this a missing feature?

2001-02-04 Thread Steve Edberg
At 8:40 PM +0200 2/4/01, Teodor Cimpoesu wrote: 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',

Re: [PHP] Is this a missing feature?

2001-02-04 Thread Teodor Cimpoesu
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

Re: [PHP] Is this a missing feature?

2001-02-04 Thread Lux
But the feature is useless :) Here, I removed the reference, so we can stop fussing over it (it wasn't the question to begin with), and here's an example of a potential use for this (a stupid example, but still...). I'm not weighing out the benefits of references, I'm striving to achieve the

Re: [PHP] Is this a missing feature?

2001-02-04 Thread Josh G
t;Lux" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 05, 2001 10:51 AM Subject: Re: [PHP] Is this a missing feature? But the feature is useless :) Here, I removed the reference, so we can stop fussing over it (it wasn't the question to begin with),

Re: [PHP] Is this a missing feature?

2001-02-04 Thread Lux
, and hangovers to... suffering. - Original Message - From: "Lux" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 05, 2001 10:51 AM Subject: Re: [PHP] Is this a missing feature? But the feature is useless :) Here,