3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function callSoap($function,$params,$url = null) { if ($url === null) { $url=EMA_URL; //in .php } //xdebug_disable(); //$url='http://test'; //$function=''; $client = new SoapClient($url); if ($client==false) return false; $params = array(new SoapParam($params, $function)); $res = $client->__soapCall($function, $params); if ($res==null) //$res is object here return false; return (array) $res; } $function = 'OutboundCallResultStatus'; $params['Credentials']['Channel'] = 'IVR'; $params['Credentials']['ClientCode'] = 'Entersekt'; $params['Credentials']['ClientProductCode'] = 'EntersektCallerAuth'; $params['Credentials']['Password'] = 'gyH434fvG'; $params['Credentials']['UserName'] = 'TestUser653'; $params['ResultStatusInput']['IDNo'] = '1512094482083'; return callSoap($function, $params, 'https://dev.onevault.co.za/AMEServicesTest/AMEServices.svc?wsdl');
based on MQT4d
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/ai8kQ:12 Stack trace: #0 /in/ai8kQ(32): callSoap('OutboundCallRes...', Array, 'https://dev.one...') #1 {main} thrown in /in/ai8kQ on line 12
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Fatal error: Class 'SoapClient' not found in /in/ai8kQ on line 12
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://dev.onevault.co.za/AMEServicesTest/AMEServices.svc?wsdl' : failed to load external entity "https://dev.onevault.co.za/AMEServicesTest/AMEServices.svc?wsdl" in /in/ai8kQ:12 Stack trace: #0 /in/ai8kQ(12): SoapClient->SoapClient('https://dev.one...') #1 /in/ai8kQ(32): callSoap('OutboundCallRes...', Array, 'https://dev.one...') #2 {main} thrown in /in/ai8kQ on line 12
Process exited with code 255.