> 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. 

See, that's not what I'm getting... :|

> Were you expecting it to expand $myArrayVar into individual 
> parameters? 

No.  Just pass those parameters by value, just as they are.

> Also, call_user_method_array is now deprecated--you should 
> use call_user_func_array instead 

This isn't my choice.  What I'm trying to do is use the PEAR
Cache class.  Actually, one of the containers therein.  And
the class is using call_user_method_array().  Sure, I could
change it manually but if I ever upgrade PEAR, all my changes 
are gone.  As such, I'm just leaving as is.

The functionality I'm trying to create is to cache a call to
a SOAP service.  It seems like it should be easy enough since
I'm just caching a call to a method of the SOAP class I'm using.
To see exactly what I'm doing, you can go do the following page:

http://www.melancholy.org/test/xml/soap/soap_client.phps

and to run the page to see the results, just remove the trailing
's'.  The SOAP service is here:

http://www.melancholy.org/test/xml/soap/db_service.phps.

And if you aren't familiar with PEAR, you can see the class I'm
trying to use here:

http://pear.php.net/package-info.php?pacid=40

Anyways, what's happening in the Cache_Function class is that
it's executing this line of code:

$result = call_user_method_array($method, $$object, $arguments);

using the values I pass on this line of my soap_client.php script:

$xmlStr = $cache->call( 'soapclient->call', array( 'returnRecordXML',
$parameters ));

"call" is the $method, "soapclient" is the object and the above
defined array is "arguments".  However, as you can see when you
go to the soapclient.php page, arguments is being passed as an
array and not as the individual elements of the array.

And I can't figure out why... :|

If you or anyone else can tell me what's going on, I'd be very happy
to hear!

Chris

Reply via email to