3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = array( 'exceptions'=>true, 'trace'=>1, 'cache_wsdl'=>0 ); try{ $client = new SoapClient('http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL', $options); } catch(SoapFault $ex) { var_dump($ex); } var_dump($client);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Class "SoapClient" not found in /in/OL16u:10 Stack trace: #0 {main} thrown in /in/OL16u on line 10
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/OL16u:10 Stack trace: #0 {main} thrown in /in/OL16u on line 10
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Class 'SoapClient' not found in /in/OL16u on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.29
object(SoapFault)#2 (9) { ["message":protected]=> string(180) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL' : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" " ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/OL16u" ["line":protected]=> int(10) ["trace":"Exception":private]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(10) "SoapClient" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["previous":"Exception":private]=> NULL ["faultstring"]=> string(180) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL' : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" " ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in /in/OL16u on line 15 NULL
Process exited with code 255.
Output for 5.2.7 - 5.2.17
Warning: SoapClient::SoapClient(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::SoapClient(http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in /in/OL16u on line 10 object(SoapFault)#2 (8) { ["message:protected"]=> string(180) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL' : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" " ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(10) "SoapClient" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["faultstring"]=> string(180) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL' : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" " ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in /in/OL16u on line 15 NULL
Process exited with code 255.
Output for 5.2.6
Warning: SoapClient::SoapClient(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::SoapClient(http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in /in/OL16u on line 10 object(SoapFault)#2 (8) { ["message:protected"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(10) "SoapClient" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["faultstring"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in /in/OL16u on line 15 NULL
Process exited with code 255.
Output for 5.2.0 - 5.2.5
Warning: SoapClient::SoapClient(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::SoapClient(http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL): failed to open stream: Connection refused in /in/OL16u on line 10 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in /in/OL16u on line 10 object(SoapFault)#2 (8) { ["message:protected"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(10) "SoapClient" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["faultstring"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in /in/OL16u on line 15 NULL
Process exited with code 255.
Output for 5.1.3 - 5.1.6
Warning: SoapClient::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::__construct(http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL): failed to open stream: Connection refused in /in/OL16u on line 10 Warning: SoapClient::__construct(): I/O warning : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in /in/OL16u on line 10 object(SoapFault)#2 (8) { ["message:protected"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(11) "__construct" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["faultstring"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in /in/OL16u on line 15 NULL
Process exited with code 255.
Output for 5.1.0 - 5.1.2
Warning: SoapClient::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::__construct(http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL): failed to open stream: Connection refused in /in/OL16u on line 10 Warning: SoapClient::__construct(): I/O warning : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in /in/OL16u on line 10 object(SoapFault)#2 (8) { ["message:protected"]=> string(0) "" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(11) "__construct" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["faultstring"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in /in/OL16u on line 15 NULL
Process exited with code 255.
Output for 5.0.5
Warning: SoapClient::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::__construct(http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL): failed to open stream: Connection refused in /in/OL16u on line 10 Warning: connection refusedI/O warning : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in /in/OL16u on line 10 object(SoapFault)#2 (8) { ["message:protected"]=> string(0) "" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(11) "__construct" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["faultstring"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in /in/OL16u on line 15 NULL
Process exited with code 255.
Output for 5.0.4
Warning: SoapClient::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/OL16u on line 10 Warning: SoapClient::__construct(http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL): failed to open stream: Connection refused in /in/OL16u on line 10 Warning: connection refusedI/O warning : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in /in/OL16u on line 10 object(SoapFault)#2 (8) { ["message:protected"]=> string(0) "" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(11) "__construct" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["faultstring"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in Unknown on line 0 NULL
Process exited with code 255.
Output for 5.0.3
object(SoapFault)#2 (8) { ["message:protected"]=> string(0) "" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/OL16u" ["line"]=> int(10) ["function"]=> string(11) "__construct" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(48) "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" [1]=> array(3) { ["exceptions"]=> bool(true) ["trace"]=> int(1) ["cache_wsdl"]=> int(0) } } } } ["faultstring"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in Unknown on line 0 NULL
Output for 5.0.0 - 5.0.2
object(SoapFault)#2 (8) { ["message:protected"]=> string(0) "" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/OL16u" ["line:protected"]=> int(10) ["trace:private"]=> array(0) { } ["faultstring"]=> string(95) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'" ["faultcode"]=> string(4) "WSDL" } Notice: Undefined variable: client in Unknown on line 0 NULL
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/OL16u on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected '{' in /in/OL16u on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/OL16u on line 9
Process exited with code 255.

preferences:
349.1 ms | 401 KiB | 459 Q