3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PixelHandling extends SoapClient{ // Client connection private $soapclient_options = array('login' => 'SlevogtE', 'password' => 'BBDEXI', 'trace' => 1); private $wsdl = 'https://' . $soapclient_options['login'] . ':' . $soapclient_options['password'] . '@tom-test.vgwort.de/services/1.0/pixelService.wsdl' ; private $client; function __construct(){ $this->client = new SoapClient($wsdl, $soapclient_options); } // Publicly accessible parameters public $publId; public $privId; public $orderDateTime; public $pixels; private function objToArr($d){ if (is_object($d)){ $d = get_object_vars($d); } if (is_array($d)){ return array_map(__FUNCTION__, $d); } else{ return $d; } } // Order Pixel (amount) --> pixels will be written to array $pixels public function orderNewPixel($amount){ $params = new StdClass(); $params->count = $amount; try{ $result = $this->client->orderPixel($params); $pixels = objToArr($result->pixels); $orderDateTime = $result->orderDateTime; // foreach($result->pixels as $val){ // array_push($pixels, $val); // } $publId = $result->publicIdentificationId; $privId = $result->privateIdentificationId; } catch(SoapFault $e){ echo "Fehlercode: ", $result->errorcode, "\n"; echo "Message: ", $result->errormsg, "\n"; echo "Folgende Anzahl wäre möglich gewesen: ", $result->maxOrder, "\n"; } } public function getPixels(){ print_r($this->pixels); foreach ($this->pixels as $key) { echo $key; } } } // 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); $test->getPixels(); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.280.0170.09212.38
5.4.270.0170.10812.38
5.4.260.0130.04312.38
5.4.250.0170.09912.38
5.4.240.0540.13412.38
5.4.230.0100.04412.37
5.4.220.0130.04112.37
5.4.210.0110.04012.37
5.4.200.0110.04112.37
5.4.190.0120.04312.37
5.4.180.0130.06112.36
5.4.170.0130.08912.38
5.4.160.0140.08512.37
5.4.150.0160.07512.37
5.4.140.0090.06912.06
5.4.130.0080.04912.04
5.4.120.0190.07612.00
5.4.110.0100.06512.00
5.4.100.0130.06012.00
5.4.90.0110.08712.00
5.4.80.0130.05812.00
5.4.70.0210.14311.99
5.4.60.0180.08911.99
5.4.50.0120.08511.99
5.4.40.0210.09411.98
5.4.30.0170.10611.98
5.4.20.0250.10211.97
5.4.10.0280.10811.97
5.4.00.0140.11011.47
5.3.280.0160.11312.70
5.3.270.0150.09712.73
5.3.260.0230.08912.72
5.3.250.0190.07712.72
5.3.240.0130.11012.72
5.3.230.0180.10012.71
5.3.220.0270.12012.68
5.3.210.0290.09312.68
5.3.200.0210.05112.68
5.3.190.0130.08112.68
5.3.180.0130.08912.68
5.3.170.0100.09212.67
5.3.160.0140.07912.68
5.3.150.0170.08412.67
5.3.140.0110.08312.66
5.3.130.0200.09012.66
5.3.120.0080.08412.66
5.3.110.0100.07812.66
5.3.100.0150.06512.12
5.3.90.0090.08412.08
5.3.80.0080.06612.08
5.3.70.0090.06612.07
5.3.60.0120.04712.06
5.3.50.0260.07312.00
5.3.40.0230.06712.00
5.3.30.0200.07311.95
5.3.20.0120.05811.73
5.3.10.0140.06311.70
5.3.00.0190.07311.69

preferences:
141.04 ms | 1394 KiB | 7 Q