/** @var string $wsdl, This is the test server i have generated to test the class */
$wsdl = "http://meabed.net/soap/test.php?WSDL";
/** @var array $options , array of options for the soap client */
$options = array('connection_timeout' => 40, 'trace' => true);
/** @var SoapClientAsync $client New Soap client instance */
$client = new SoapClientAsync($wsdl, $options);
/**
 * You can set debug mode to true to see curl verbose response if you run the script from command line
 * @default false
 */
$client::$debug = true;
/** @var string $session , SessionId required in SoapOperations */
$session = null;
/** Normal ONE SOAP CALL Using CURL same exact as soap synchronous api calls of any web service */
try {
    $loginSoapCall = $client->login(array('demo', '123456'));
    $session = $loginSoapCall->Return;
} catch (SoapFault $ex) {
    print 'SoapFault: ' . $ex->faultcode . ' - ' . $ex->getMessage() . "\n";
} catch (Exception $e) {
    print 'Exception: ' . $ex->faultcode . ' - ' . $ex->getMessage() . "\n";
}
/**
 * set SoapClient Mode to asynchronous mode.
 * This will allow opening as many as connections to the host and perform all
 * request at once so you don't need to wait for consecutive calls to performed after each other
 * @default is false AND it get reset back to FALSE after each $client->run();
 *
 */
$client::$async = true;
/** @var array $requestIds */
$wsdl = "http://meabed.net/soap/test.php?WSDL";
/** @var array $options , array of options for the soap client */
$options = ['connection_timeout' => 40, 'trace' => true];
/** @var SoapClientAsync $client New Soap client instance */
$client = new SoapClientAsync($wsdl, $options);
/**
 * You can set debug mode to true to see curl verbose response if you run the script from command line
 *
 * @default false
 */
$client::$debug = true;
/** @var string $session , SessionId required in SoapOperations */
$session = null;
/** Normal ONE SOAP CALL Using CURL same exact as soap synchronous api calls of any web service */
try {
    $loginSoapCall = $client->login(['demo', '123456']);
    $session = $loginSoapCall->Return;
} catch (SoapFault $ex) {
    print 'SoapFault: ' . $ex->faultcode . ' - ' . $ex->getMessage() . "\n";
} catch (Exception $e) {
    print 'Exception: ' . $ex->faultcode . ' - ' . $ex->getMessage() . "\n";
}
/**
 * set SoapClient Mode to asynchronous mode.
 * This will allow opening as many as connections to the host and perform all
 * request at once so you don't need to wait for consecutive calls to performed after each other
 *
 * @default is false AND it get reset back to FALSE after each $client->run();
 *
 */
$client::$async = true;