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" =>
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
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
# [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
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
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
]]
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
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
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
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:
10 matches
Mail list logo