3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ini_set("soap.wsdl_cache_enabled", "0"); ini_set('default_socket_timeout', 600); try { $soap_option = array('trace' => true, 'connection_timeout' => 120, 'exceptions' => true); $requestParams = array('usuario' => 'reservasweb', 'pass' => 'Turis2015'); $client = new SoapClient('http://turismar.servidoresdelsur.uy:8081/PostDesa/ReservaServicio.svc?wsdl',$soap_option); $result = $client->DoLogin($requestParams); //, array('trace' => 1, 'soap_version' => SOAP_2_0, 'encoding'=> 'UTF-8') $sessionID = $result->DoLoginResult; //echo $sessionID; } catch (Exception $e) { var_dump($e); } header('Content-type: application/xml'); echo $client->__getLastResponse(); ?>
based on Rfpno
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/S4K8g:7 Stack trace: #0 {main} thrown in /in/S4K8g on line 7
Process exited with code 255.
Output for 5.4.8 - 5.6.28
Fatal error: Class 'SoapClient' not found in /in/S4K8g on line 7
Process exited with code 255.
Output for 5.3.18 - 5.3.29
object(SoapFault)#2 (9) { ["message":protected]=> string(232) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://turismar.servidoresdelsur.uy:8081/PostDesa/ReservaServicio.svc?wsdl' : failed to load external entity "http://turismar.servidoresdelsur.uy:8081/PostDesa/ReservaServicio.svc?wsdl" " ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/S4K8g" ["line":protected]=> int(7) ["trace":"Exception":private]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/S4K8g" ["line"]=> int(7) ["function"]=> string(10) "SoapClient" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(74) "http://turismar.servidoresdelsur.uy:8081/PostDesa/ReservaServicio.svc?wsdl" [1]=> array(3) { ["trace"]=> bool(true) ["connection_timeout"]=> int(120) ["exceptions"]=> bool(true) } } } } ["previous":"Exception":private]=> NULL ["faultstring"]=> string(232) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://turismar.servidoresdelsur.uy:8081/PostDesa/ReservaServicio.svc?wsdl' : failed to load external entity "http://turismar.servidoresdelsur.uy:8081/PostDesa/ReservaServicio.svc?wsdl" " ["faultcode"]=> string(4) "WSDL" } Warning: Cannot modify header information - headers already sent by (output started at /in/S4K8g:16) in /in/S4K8g on line 18 Notice: Undefined variable: client in /in/S4K8g on line 19 Fatal error: Call to a member function __getLastResponse() on a non-object in /in/S4K8g on line 19
Process exited with code 255.