Re: [PHP] func_get_args as a hash? (faster constructors)

2006-11-29 Thread Larry Garfield
On Tuesday 28 November 2006 20:09, Jochem Maas wrote: > Kelly Jones wrote: > > If I define a function like this: > > > > function foo ($x, $y, $z) {} > > > > and then call: foo(1,2,"bar"); > > > > is there a function I can call inside foo() that yields this hash: > > > > {"x" => 1, "y" => 2, "z" =>

Re: [PHP] func_get_args as a hash? (faster constructors)

2006-11-29 Thread Richard Lynch
On Mon, November 27, 2006 7:57 pm, Kelly Jones wrote: > If I define a function like this: > > function foo ($x, $y, $z) {} > > and then call: foo(1,2,"bar"); > > is there a function I can call inside foo() that yields this hash: > > {"x" => 1, "y" => 2, "z" => "bar"} > > In other words, gives me th

Re: [PHP] func_get_args as a hash? (faster constructors)

2006-11-28 Thread Jochem Maas
Kelly Jones wrote: > If I define a function like this: > > function foo ($x, $y, $z) {} > > and then call: foo(1,2,"bar"); > > is there a function I can call inside foo() that yields this hash: > > {"x" => 1, "y" => 2, "z" => "bar"} > > In other words, gives me the values *and names* of the ar

Re: [PHP] func_get_args as a hash? (faster constructors)

2006-11-28 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-27 18:57:54 -0700: > is there a function I can call inside foo() that yields this hash: > > {"x" => 1, "y" => 2, "z" => "bar"} > > In other words, gives me the values *and names* of the arguments to foo? > > func_get_args just yields the values. > > Having this fun

RE: [PHP] func_get_args as a hash? (faster constructors)

2006-11-28 Thread Vincent DUPONT
params should probably be refactored... Especially inside the constructor ! this is my own thinking, of course Vincent -Original Message- From: Kelly Jones [mailto:[EMAIL PROTECTED] Sent: Tue 28/11/2006 2:57 To: php-general@lists.php.net Subject: [PHP] func_get_args as a hash? (faster

[PHP] func_get_args as a hash? (faster constructors)

2006-11-27 Thread Kelly Jones
If I define a function like this: function foo ($x, $y, $z) {} and then call: foo(1,2,"bar"); is there a function I can call inside foo() that yields this hash: {"x" => 1, "y" => 2, "z" => "bar"} In other words, gives me the values *and names* of the arguments to foo? func_get_args just yiel

RE: [PHP] func_get_args...

2003-01-09 Thread Sean Malloy
]] Sent: Friday, 10 January 2003 3:24 PM To: PHP General Subject: [PHP] func_get_args... Is this possible; function TestRef() { $var =& func_get_arg(0); ++$var; } $b = 1; TestRef($b); echo $b; It doesn't seem to work. Is there a way to do it? Or am I wasting my time trying t

[PHP] func_get_args...

2003-01-09 Thread Sean Malloy
Is this possible; function TestRef() { $var =& func_get_arg(0); ++$var; } $b = 1; TestRef($b); echo $b; It doesn't seem to work. Is there a way to do it? Or am I wasting my time trying to do this? (Yes I am aware I could define TestRef(&$b)), but I can't, reason being; I'm trying to cr

Re: [PHP] func_get_args() and call-by-reference?

2003-01-02 Thread Atahualpa Jones
rk properly! I am using php 4.2.1 TIA, Ata - Original Message - From: "Atahualpa Jones" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 02, 2003 1:27 AM Subject: [PHP] func_get_args() and call-by-reference? Hi, I try to do a function ca

[PHP] func_get_args() and call-by-reference?

2003-01-01 Thread Atahualpa Jones
Hi, I try to do a function called unicode_enc() which takes a number of parameters that differ between calls. It should encode all parameters to unicode using utf8_encode($arglist[$i]). I am using Variable-length argument lists as described in the manual and tried to call the function this way: