3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $domena = "szj.cz"; $client = new SoapClient( null, array( "location" => "http://soap.subreg.cz/cmd.php", "uri" => "http://soap.subreg.cz/soap" ) ); $params = array ( "data" => array ( "login" => "jmeno", "password" => "heslo", ) ); $response = $client->__call("Login",$params); $token = $response["data"]["ssid"]; unset($params); $params = array ( "data" => array ( "ssid" => $token, "domain" => $domena, ) ); $response = $client->__call("Check_Domain",$params); echo 'Doména '.$domena.' je '; if ($response["data"]["avail"] == 0) { echo '<span style="color:#FF0000">Obsazená</span>'; } else if($response["data"]["avail"] == 1) { echo '<span style="color:#00FF00">Volná</span>'; } ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/cdgne:5 Stack trace: #0 {main} thrown in /in/cdgne on line 5
Process exited with code 255.
Output for 5.4.34 - 5.6.28
Fatal error: Class 'SoapClient' not found in /in/cdgne on line 5
Process exited with code 255.
Output for 5.1.3 - 5.4.32
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /in/cdgne:20 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://soap.sub...', 'http://soap.sub...', 1, 0) #1 /in/cdgne(20): SoapClient->__call('Login', Array) #2 {main} thrown in /in/cdgne on line 20
Process exited with code 255.
Output for 5.0.5 - 5.1.2
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /in/cdgne:20 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://soap.sub...', 'http://soap.sub...', 1) #1 /in/cdgne(20): SoapClient->__call('Login', Array) #2 {main} thrown in /in/cdgne on line 20
Process exited with code 255.
Output for 5.0.3 - 5.0.4
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /in/cdgne:20 Stack trace: #0 /in/cdgne(20): SoapClient->__doRequest('<?xml version="...', 'http://soap.sub...', 'http://soap.sub...', 1) #1 /in/cdgne(20): SoapClient->__call('Login', Array) #2 {main} thrown in /in/cdgne on line 20
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /in/cdgne:20 Stack trace: #0 /in/cdgne(20): SoapClient->__call('<?xml version="...', 'http://soap.sub...', 'http://soap.sub...', 1) #1 {main} thrown in /in/cdgne on line 20
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: soapclient in /in/cdgne on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: soapclient in /in/cdgne on line 5