Re: call_user_method_array

From: Date: Wed, 01 Jan 2003 14:15:04 +0000
Subject: Re: call_user_method_array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-129849@lists.php.net to get a copy of this message
Chris-- On my system, the function works as expected (at least as I understand it): myFunc receives the parameters "Hello!" and array("this"=>"that"), which is what you pass to it in the first place. Were you expecting it to expand $myArrayVar into individual parameters? If so, that's not how it works--it expands the values of the array you pass to it (which, in this case, you build explicitly during the call), but doesn't expand any arrays that may be within that array. Also, call_user_method_array is now deprecated--you should use call_user_func_array instead (the manual page for call_user_method_array explains how to do this with a class method). Cheers, Marco -- ---------------- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at http://www.phparch.com!

« previous php.general (#129849) next »