I'm Using PHP 5 and the built-in SoapClient.
This is really a question for the developers of PHP Soap support.
The SoapClient gives you 2 choices: WSDL mode, which caches the WSDL file locally, and non-WSDL which requires you to build your own requests.
Using the WSDL is obviously more convenient. But, I wonder how much processing this does each time you create a SoapClient instance. The WSDL is cached, but does it have to re-process the entire WSDL each time you create a SoapClient? If so, it seems it might be more efficient (CPU-wise) to go the non-WSDL route.
It's no problem to create the non-WSDL SoapClient in my situation. Should I?
It takes enough time for them to build in a cache (so its painful). I guess the real question is when does that cache expire (on script exit?) and how many calls are you making (per script?).
Also it sounds like you're trying to prematurely optimize something. If its not a problem don't worry about it. You could spend up time on something that doesn't matter.
[vagrant@localhost docroot]$ php -i | grep soap
/etc/php.d/soap.ini,
soap
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400
And adjust the TTL in your PHP confi - Bizmate 2015-07-15 09:38