RE: [PHP] func_get_args...
| From: | Sean Malloy | Date: | Fri, 10 Jan 2003 05:11:24 +0000 |
| Subject: | RE: [PHP] func_get_args... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131044@lists.php.net to get a copy of this message | ||
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:sean@element.net.au]
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