Hi,

Saturday, July 3, 2004, 3:00:22 AM, you wrote:
AN> Tom Rogers wrote:

>>With call_user_function() you need to do this:
>>
>>call_user_func("fun", &$var);
>>  
>>
AN> Tom, this won't work due to the Call-Time Pass-By-Reference deprecation.

AN> Does anyone know how to do this?

AN> The error message says "If you would like to pass it by reference,
AN> modify the declaration of call_user_func()" ... how would i do this?

AN> Andrew
Sorry about that, I checked it in cli and it doesn't give a warning.
This is another way:

function fun($arg) {
        $arg++;
}
$var = 0;
call_user_func_array("fun", array(&$var));
echo $var;

-- 
regards,
Tom

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

Reply via email to