Re: call_user_func problem
| From: | Papp Gyozo | Date: | Sat, 24 Nov 2001 09:26:06 +0000 |
| Subject: | Re: call_user_func problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76310@lists.php.net to get a copy of this message | ||
| That means that you should create a .htaccess file containing that:
|
| php_value allow_call_time_pass_reference 1
|
| That should work :)
But as the errormessage mentioned it may not supported in future version.
I think if you declare your function arguments to be passed by variables
then you don't need to explicitly set it in call-time.
does it work? (i've not tried yet.)
$result = call_user_func("foo", $bar);
function foo( &$bar ) {
$bar .= 'foobar';
return 1;
}
|
| C> Prior to 4.0.6 it worked fine, however, now when I try:
|
| C> $result = call_user_func("foo", &$bar);
|
| C> function foo( &$bar ) {
| C> $bar .= 'foobar';
| C> return 1;
| C> }
|
| C> I get this:
|
| C> Warning: Call-time pass-by-reference has been deprecated - argument passed
| C> by value; If you would like to pass it by reference, modify the declaration
| C> of call_user_func(). If you would like to enable call-time
| C> pass-by-reference, you can set allow_call_time_pass_reference to true in
| C> your INI file. However, future versions may not support this any longer.
|
| C> Does that mean I can't pass by reference anymore? I kinda need to (the two
| C> functions above are not my actual functions btw)....
|
|
| ------------------------------------------------
| Ivan 'Faeton aka xetrix' Danishevsky
| ICQ(240266) faeton@xemichat.com www.xemichat.com
| ::: Ńëîíű ďî äĺpĺâü˙ě íĺ ëŕçŕţň. Îíč ěîăyň, íî čő ëîěŕĺň.
:::
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
| For additional commands, e-mail: php-general-help@lists.php.net
| To contact the list administrators, e-mail: php-list-admin@lists.php.net
|