Re: call_user_func and call-time pass-by-reference
| From: | Curt Zirzow | Date: | Fri, 02 Jul 2004 20:30:37 +0000 |
| Subject: | Re: call_user_func and call-time pass-by-reference | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189578@lists.php.net to get a copy of this message | ||
* Thus wrote Andrew Nagy:
> How do you use the call_user_func function with call-time
> pass-by-reference deprecation?
>
> For example:
>
> function fun(&$arg) {
> $arg++;
> }
> $var = 0;
> call_user_func("fun", $var);
> echo $var; //echoes 0 instead of 1
$func_call = 'fun';
$func_call($var);
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!