Great, i must have done something wrong, it works for me now.

Thanks for all your help :)

Andrew

Tom Rogers wrote:

Hi,

Thursday, July 8, 2004, 3:38:41 AM, you wrote:

AN> Hmm ... this still echos 0 and not 1. I am using 4.3.7 with all AN> warnings on.

AN> Does anyone know how to use this function or anything similiar with
AN> passing by refernce. Since the call-time pass by reference is AN> deprecated, this practice is no longer valid, but there must be a work
AN> around?


AN> Thanks for any assistance
AN> Andrew

Strange as it works for me (http://fred.kwikin.com/user.php) with this
code exactly:

<?php
function fun($arg) {
       $arg++;
}
$var = 0;
echo "Before:$var<br>";
call_user_func_array("fun", array(&$var));
echo "After:$var<br>";
?>

What version of PHP are you using?





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



Reply via email to