我有这样的方法:
noscript
我想做的是在回调方法中分配 $status = null;
$authority = null;
SoapWrapper::service('currency', function (Service $service) use ($data, $status, $authority)
{
$service->call('PaymentRequest', [$data]);
$status = $service->call('PaymentRequest', [$data])->Status;
$authority = $service->call('PaymentRequest', [$data])->Authority;
});
return array(['status' => $status, 'authority' => $authority]);
和$status
。但是phpstorm提示我在$authority
区域return array
和$status
从未分配。
如何在回调方法中分配局部变量?