3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $client = new SoapClient('/path/to/wsdl.wsdl', $wsdlOptions); $headers = array(); $headers[] = new SoapHeader('https://external.soap-location.com', 'X-Header_1_NAME', 'X-Header_1_Value'); $headers[] = new SoapHeader('https://external.soap-location.com', 'X-Header_2_NAME', 'X-Header_2_Value'); $client->__setSoapHeaders($headers); $client->__setLocation('https://external.soap-location.com'); $request = new API\MyRequest(); $request->setIncludeDetails(true); $result = $client->__soapCall('external_Soap_Function', array($request)); echo (string) $soap->__getLastRequestHeaders();
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/5avML:2 Stack trace: #0 {main} thrown in /in/5avML on line 2
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Class 'SoapClient' not found in /in/5avML on line 2
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Notice: Undefined variable: wsdlOptions in /in/5avML on line 2 Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient(): Invalid parameters in /in/5avML:2 Stack trace: #0 /in/5avML(2): SoapClient->SoapClient('/path/to/wsdl.w...', NULL) #1 {main} thrown in /in/5avML on line 2
Process exited with code 255.