I have the following dilemma, I have a SOAP API, need to optimise a method:
public function myMethodForOptimisation(array $options) {
//doing some stuff
$this->requestsAnUltraSlowTimeConsumingMethod();
return $someData;
}
I do not really need to wait for the finalisation of the $this->requestsAnUltraSlowTimeConsumingMethod()
i just asynchronously want to say to this method to do stuff and return
the result to customer.
Need to transform it in something like:
public function myMethodForOptimisation(array $options) {
//doing some stuff
async_method_call($this->requestsAnUltraSlowTimeConsumingMethod());
return $someData;
}
Is there an async_method_call() in PHP ?