3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $url = "https://ri.test.msb.se/RapportServiceWS.svc?wsdl"; $client = new SoapClient($url, array('soap_version' => SOAP_1_1, 'location' => 'https://ri.test.msb.se/RapportServiceWS.svc/basicHttpBinding', 'exceptions' => 1, 'trace' => 1 )); $headers = array(); function guid() { mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up. $charid = strtoupper(md5(uniqid(rand(), true))); $hyphen = chr(45); $uuid = 'uuid'.$hyphen .substr($charid, 0, 8).$hyphen .substr($charid, 8, 4).$hyphen .substr($charid,12, 4).$hyphen .substr($charid,16, 4).$hyphen .substr($charid,20,12).$hyphen.'1'; return $uuid; } function generate_header() { $WSSE_NS = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'; $WSSE_PFX = 'wsse'; $WSU_NS = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'; $WSU_PFX = 'wsu'; $PASSWORD_TYPE = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'; $username = 'TestProgram'; $password = 'jtKLGpaKZ9XqmA40QGo'; $currentTime = time(); $timestamp=gmdate('Y-m-d\TH:i:s', $currentTime).'Z'; $expiretimestamp=gmdate('Y-m-d\TH:i:s', $currentTime + 300).'Z'; $nonce=mt_rand(); $passdigest=base64_encode(pack('H*',sha1(pack('a*',$password)))); $header=' <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="'.$WSSE_NS.'" xmlns:wsu="'.$WSU_NS.'"> <wsu:Timestamp wsu:Id="_0"> <wsu:Created>'.$timestamp.'</wsu:Created> <wsu:Expires>'.$expiretimestamp.'</wsu:Expires> </wsu:Timestamp> <wsse:UsernameToken wsu:Id="'.guid().'"> <wsse:Username>'.$username.'</wsse:Username> <wsse:Password Type="'.$PASSWORD_TYPE.'">'.$password.'</wsse:Password>'. '</wsse:UsernameToken>'. '</wsse:Security>'; $headerSoapVar=new SoapVar($header,XSD_ANYXML); $soapheader=new SoapHeader($WSSE_NS, "Security" , $headerSoapVar , true); return $soapheader; } $headers[] = generate_header(); $client->__setSoapHeaders($headers); $params = array(); $pingresult = $client->Ping($params); echo $pingresult->PingResult; var_dump($pingresult); } catch (SoapFault $e) { echo($e->getMessage()); echo '<br><br>'; echo($e); } catch (Exception $err) { echo ($e->getMessage()); echo '<br><br>'; echo($err); } ?>

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)
7.2.00.0040.00819.31
7.1.70.0030.00717.09
7.1.60.0070.00717.16
7.1.50.0130.00716.77
7.1.00.0000.08022.36
7.0.200.0070.01016.50
7.0.100.0070.07720.10
7.0.90.0130.05719.98
7.0.80.0170.07319.93
7.0.70.0030.08720.00
7.0.60.0070.07719.93
7.0.50.0430.07320.42
7.0.40.0100.08020.04
7.0.30.0070.04320.05
7.0.20.0100.07020.18
7.0.10.0100.08320.14
7.0.00.0230.07019.99
5.6.280.0030.07021.13
5.6.250.0070.08020.62
5.6.240.0070.04320.53
5.6.230.0130.07320.70
5.6.220.0130.07720.51
5.6.210.0100.08020.68
5.6.200.0070.05721.02
5.6.190.0100.04320.98
5.6.180.0100.07720.96
5.6.170.0100.07020.96
5.6.160.0030.08721.07
5.6.150.0070.06021.05
5.6.140.0070.08321.04
5.6.130.0030.08020.95
5.6.120.0070.04721.13
5.6.110.0100.08021.08
5.6.100.0130.08321.12
5.6.90.0070.08021.11
5.6.80.0070.05020.36
5.6.70.0000.07720.34
5.6.60.0170.03320.44
5.6.50.0030.08320.58
5.6.40.0030.05720.41
5.6.30.0070.07320.41
5.6.20.0070.08720.43
5.6.10.0070.07320.39
5.6.00.0030.08020.40
5.5.380.0100.05320.47
5.5.370.0130.07720.38
5.5.360.0170.07320.39
5.5.350.0130.08020.43
5.5.340.0130.06020.93
5.5.330.0070.08720.95
5.5.320.0030.08020.86
5.5.310.0130.05720.82
5.5.300.0030.04720.77
5.5.290.0100.08020.82
5.5.280.0030.08720.90
5.5.270.0030.06320.79
5.5.260.0070.04320.78
5.5.250.0200.07020.72
5.5.240.0100.06020.19
5.5.230.0200.06720.29
5.5.220.0030.06020.26
5.5.210.0100.07320.20
5.5.200.0030.08720.30
5.5.190.0070.08020.18
5.5.180.0100.07020.13
5.5.160.0070.07320.26
5.5.150.0070.03720.23
5.5.140.0030.04020.27
5.5.130.0100.07320.16
5.5.120.0100.08320.27
5.5.110.0030.08320.23
5.5.100.0070.09020.08
5.5.90.0170.03320.17
5.5.80.0030.08320.09
5.5.70.0100.08020.09
5.5.60.0070.07020.13
5.5.50.0100.08020.08
5.5.40.0170.06720.11
5.5.30.0100.07020.07
5.5.20.0070.04320.07
5.5.10.0130.04020.14
5.5.00.0070.04720.14
5.4.450.0030.07719.56
5.4.440.0070.05019.50
5.4.430.0070.05719.44
5.4.420.0100.05719.22
5.4.410.0070.08019.07
5.4.400.0030.04319.22
5.4.390.0170.05319.14
5.4.380.0200.06719.21
5.4.370.0030.06719.03
5.4.360.0070.05718.88
5.4.350.0000.05018.95
5.4.340.0130.06319.06
5.4.320.0070.05019.23
5.4.310.0070.04319.16
5.4.300.0070.07319.12
5.4.290.0030.09018.94
5.4.280.0100.06718.91
5.4.270.0030.08019.20
5.4.260.0130.06019.12
5.4.250.0000.08019.16
5.4.240.0100.05019.12
5.4.230.0130.07318.87
5.4.220.0000.06719.20
5.4.210.0070.04319.08
5.4.200.0070.04319.13
5.4.190.0130.03719.11
5.4.180.0030.08018.86
5.4.170.0070.07319.04
5.4.160.0030.04719.02
5.4.150.0100.07019.18
5.4.140.0030.05716.21
5.4.130.0030.07016.45
5.4.120.0070.05316.20
5.4.110.0200.06016.48
5.4.100.0000.04716.29
5.4.90.0000.05716.42
5.4.80.0070.07016.42
5.4.70.0100.06716.41
5.4.60.0130.04716.43
5.4.50.0000.05016.33
5.4.40.0070.08716.50
5.4.30.0070.07016.44
5.4.20.0070.04716.31
5.4.10.0100.07016.48
5.4.00.0100.07015.86
5.3.290.0100.07014.68
5.3.280.0030.04714.71
5.3.270.0030.07314.71
5.3.260.0100.07714.79
5.3.250.0030.07314.62
5.3.240.0070.05714.68
5.3.230.0070.06714.70
5.3.220.0130.07014.68
5.3.210.0030.07314.70
5.3.200.0070.06714.69
5.3.190.0000.05014.78
5.3.180.0070.04014.75
5.3.170.0200.06014.79
5.3.160.0130.06314.63
5.3.150.0030.04714.69
5.3.140.0030.07714.77
5.3.130.0070.08014.64
5.3.120.0070.07714.70
5.3.110.0070.07714.66
5.3.100.0070.06314.14
5.3.90.0230.06014.04
5.3.80.0030.07714.12
5.3.70.0100.06714.11
5.3.60.0070.04314.19
5.3.50.0000.07714.14
5.3.40.0130.04714.16
5.3.30.0100.07314.06
5.3.20.0130.06313.80
5.3.10.0100.06713.75
5.3.00.0030.05013.73
5.2.170.0070.04711.29
5.2.160.0070.04011.16
5.2.150.0070.06011.21
5.2.140.0130.06311.28
5.2.130.0030.06711.30
5.2.120.0070.03011.20
5.2.110.0030.06311.22
5.2.100.0100.05011.10
5.2.90.0000.06311.32
5.2.80.0070.05311.12
5.2.70.0030.06711.11
5.2.60.0070.05711.15
5.2.50.0100.03311.22
5.2.40.0100.04311.09
5.2.30.0030.06311.09
5.2.20.0000.06311.09
5.2.10.0030.04311.09
5.2.00.0030.03311.09
5.1.60.0100.05711.09
5.1.50.0070.04711.09
5.1.40.0000.02711.09
5.1.30.0000.05311.09
5.1.20.0030.05311.09
5.1.10.0030.05711.09
5.1.00.0000.04311.09
5.0.50.0030.04311.09
5.0.40.0000.03711.09
5.0.30.0030.03311.09
5.0.20.0100.04011.09
5.0.10.0030.03311.09
5.0.00.0030.06711.09
4.4.90.0000.03711.09
4.4.80.0030.01711.09
4.4.70.0000.02011.09
4.4.60.0070.02711.09
4.4.50.0070.03011.09
4.4.40.0030.05711.09
4.4.30.0000.02011.09
4.4.20.0100.02711.09
4.4.10.0070.03011.09
4.4.00.0030.05311.09
4.3.110.0070.01711.09
4.3.100.0070.02011.09
4.3.90.0100.02711.09
4.3.80.0070.03711.09
4.3.70.0030.03711.09
4.3.60.0030.02711.09
4.3.50.0030.02711.09
4.3.40.0070.02711.09
4.3.30.0030.02311.09
4.3.20.0000.01711.09
4.3.10.0000.01711.09
4.3.00.0000.01711.09

preferences:
45.06 ms | 403 KiB | 5 Q