well upon reading user comments in manual, looks like the only solution is
to dump variables into an array, and pass the array to a function with a
single defined by-ref parameter, so it kind of defeats the purpose.

Oh well.

-----Original Message-----
From: Sean Malloy [mailto:[EMAIL PROTECTED]]
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 to do this?

(Yes I am aware I could define TestRef(&$b)), but I can't, reason being; I'm
trying to create a couple of functions that 'sort of' emulate function
overloading, but also allow me to pass a couple of objects by reference
rather than value

Anyone tried to do this already?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to