3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Pixel { public $orderDateTime; public $domain; public $publId; public $privId; } class PixelHandling extends SoapClient{ // Client connection private $client_options = array('login' => 'SlevogtE', 'password' => 'BBDEXI', 'trace' => 1); private $wsdl; private $client; function __construct(){ $this->wsdl = 'https://' . $this->client_options['login'] . ':' . $this->client_options['password'] . '@tom-test.vgwort.de/services/1.0/pixelService.wsdl' ; $this->client = new SoapClient($this->wsdl, $this->client_options); } // Order Pixel (amount) --> pixels will be written to array $pixels public function orderNewPixel($amount){ $params = new StdClass(); $params->count = $amount; $arr = array(); try{ $result = $this->client->orderPixel($params); foreach($result as $val){ $pixels = new Pixel(); $pixels->orderDateTime = $val->orderDateTime; $pixels->domain = $val->domain; $pixels->publId = $val->pixels->publicIdentificationId; $pixels->privId = $val->pixels->privateIdentificationId; array_push($arr, $pixels); } } catch(SoapFault $e){ echo "Fehlercode: ", $result->errorcode, "\n"; echo "Message: ", $result->errormsg, "\n"; echo "Folgende Anzahl waere moeglich gewesen: ", $result->maxOrder, "\n"; } return $arr; } } // Check whether Soap can be even used.. if(!class_exists('SoapClient')){ echo '<script type="text/javascript" language="Javascript">alert("Fehler: PHP-Modul fehlt.")</script>'; } $test = new PixelHandling(); $test->orderNewPixel(2); // Format für Pixel export // <IMG src="domain.met.vgwort.de/na/c5b7568d28884052a9ff92d5afd08f34" // height="1" width="1" border=“0“> ?>
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/9hJ0H:12 Stack trace: #0 {main} thrown in /in/9hJ0H on line 12
Process exited with code 255.
Output for 7.3.12 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/9hJ0H:12 Stack trace: #0 {main} thrown in /in/9hJ0H on line 12
Process exited with code 255.
Output for 5.4.34 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33
Fatal error: Class 'SoapClient' not found in /in/9hJ0H on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.32
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/9hJ0H:21 Stack trace: #0 /in/9hJ0H(21): SoapClient->SoapClient('https://Slevogt...', Array) #1 /in/9hJ0H(61): PixelHandling->__construct() #2 {main} thrown in /in/9hJ0H on line 21
Process exited with code 255.
Output for 5.2.7 - 5.2.17
Notice: SoapClient::SoapClient(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9hJ0H on line 21 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/9hJ0H on line 21 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/9hJ0H:21 Stack trace: #0 /in/9hJ0H(21): SoapClient->SoapClient('https://Slevogt...', Array) #1 /in/9hJ0H(61): PixelHandling->__construct() #2 {main} thrown in /in/9hJ0H on line 21
Process exited with code 255.
Output for 5.2.0 - 5.2.6
Notice: SoapClient::SoapClient(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9hJ0H on line 21 Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/9hJ0H on line 21 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/9hJ0H:21 Stack trace: #0 /in/9hJ0H(21): SoapClient->SoapClient('https://Slevogt...', Array) #1 /in/9hJ0H(61): PixelHandling->__construct() #2 {main} thrown in /in/9hJ0H on line 21
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Notice: SoapClient::__construct(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9hJ0H on line 21 Warning: SoapClient::__construct(): I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/9hJ0H on line 21 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/9hJ0H:21 Stack trace: #0 /in/9hJ0H(21): SoapClient->__construct('https://Slevogt...', Array) #1 /in/9hJ0H(61): PixelHandling->__construct() #2 {main} thrown in /in/9hJ0H on line 21
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Notice: SoapClient::__construct(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9hJ0H on line 21 Notice: SoapClient::__construct(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/9hJ0H on line 21 Warning: I/O warning : failed to load external entity "https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl" in /in/9hJ0H on line 21 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/9hJ0H:21 Stack trace: #0 /in/9hJ0H(21): SoapClient->__construct('https://Slevogt...', Array) #1 /in/9hJ0H(61): PixelHandling->__construct() #2 {main} thrown in /in/9hJ0H on line 21
Process exited with code 255.
Output for 5.0.3
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/9hJ0H:21 Stack trace: #0 /in/9hJ0H(21): SoapClient->__construct('https://Slevogt...', Array) #1 /in/9hJ0H(61): PixelHandling->__construct() #2 {main} thrown in /in/9hJ0H on line 21
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://SlevogtE:BBDEXI@tom-test.vgwort.de/services/1.0/pixelService.wsdl' in /in/9hJ0H:21 Stack trace: #0 /in/9hJ0H(61): PixelHandling->__construct('https://Slevogt...', Array) #1 {main} thrown in /in/9hJ0H on line 21
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/9hJ0H on line 5
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 T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/9hJ0H on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/9hJ0H on line 5
Process exited with code 255.

preferences:
253.35 ms | 401 KiB | 313 Q