3v4l.org

run code in 300+ PHP versions simultaneously
<?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 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/cdgne:5 Stack trace: #0 {main} thrown in /in/cdgne on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
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.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Class 'SoapClient' not found in /in/cdgne on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.29
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.

preferences:
254.9 ms | 402 KiB | 415 Q