3v4l.org

run code in 300+ PHP versions simultaneously
<?php $privateKey = '0ac56cf42961b3a00e3a54e8608ac56628331a1a21e28e44288b713442c05d9c'; //your private-key $publicKey = 'd7830ae49fbe30ce79aa033662057fcb8c0d57959411066208444d709c3cd87a'; //your public-key $resource = '/shipment/'; //uri of a resource $timestamp = time(); //only needed for the testing-server $baseUrl = 'https://testing.swissconnect.ch/api/'; $basicAuthUser = 'swissconnect'; $basicAuthPass = 't3St-M4th1lda'; $contentData = '<?xml version="1.0" encoding="UTF-8"?> <ns0:MT_SWISSCONNECT_REQUEST xmlns:ns0="http://postlogistics.schindler.com"><auftrag><system_fk_id>9999</system_fk_id><startdatum>2014-10-24 14:40:44</startdatum><rechnungsbeschreibung_offiziell>4700946399 / S-GE</rechnungsbeschreibung_offiziell><rechnungssteller>2</rechnungssteller><bezahl_kurier_id>600</bezahl_kurier_id><bemerkung>bitte Monteur 30 Min. vorher anrufen / Appelez le monteur 30 Min. avant svp.</bemerkung><auftrag_absender_kontaktadressen><item><firma>Schindler AufzÃ1Ž4ge AG</firma><addresse>Zugerstrasse 13</addresse><postleitzahl>6030</postleitzahl><ort>Ebikon</ort></item></auftrag_absender_kontaktadressen><auftrag_empfaenger_kontaktadressen><item><firma>Schindler AufzÃ1Ž4ge AG</firma><addresse>Friedgrabenstrasse 15</addresse><postleitzahl>8907</postleitzahl><ort>Wettswil</ort><kontakt>Kapinos Tobias / 044 172 8484 844</kontakt></item></auftrag_empfaenger_kontaktadressen><auftrag_dritte_kontaktadressen><item><kontaktadresse_id>62300</kontaktadresse_id><bezahlt_bool>true</bezahlt_bool></item></auftrag_dritte_kontaktadressen><colis><item><anzahl>1</anzahl><gewicht>0.035 </gewicht><laenge>20.000 </laenge><breite>20.000 </breite><hoehe>20.000 </hoehe><beschreibung>Paket</beschreibung></item></colis><auftrag_kuriere_dritte><item><kurier_id>101</kurier_id></item></auftrag_kuriere_dritte></auftrag></ns0:MT_SWISSCONNECT_REQUEST>'; //For the hash-key we do not need the serverPW $url = $baseUrl . $privateKey . '/' . $timestamp . $resource; //generating hash which has to be placed in the header of the request. Header name: X-hash $resultHash = hash('sha256', $url . $contentData); $sendUrl = $baseUrl . $publicKey . '/' . $timestamp . $resource; $httpHeaders = array( "Content-Type: application/xml", "Accept: application/xml", "X-hash: " . $resultHash, "X-language: de", "Authorization: Basic ". base64_encode($basicAuthUser. ':'. $basicAuthPass), ); $httpheaderstring = implode(",", $httpHeaders); echo '$HTTP_HEADER..: '.$httpheaderstring."\n"; echo '$TIMESTAMP....: '.$timestamp."\n"; echo '$SEND_URL.....: '.$sendUrl."\n"; echo '$RESULTHASH...: '.$resultHash."\n"; echo '$URL_FOR_HASH.: '.$url."\n"; echo '$CONTENTDATA..: '.$contentData."\n";

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.3.10.0050.00716.77
7.3.00.0070.00716.74
7.2.130.0070.00716.87
7.2.120.0080.00716.80
7.2.110.0060.00616.93
7.2.100.0070.00416.78
7.2.90.0030.01017.10
7.2.80.0060.00616.97
7.2.70.0080.00616.88
7.2.60.0100.00516.93
7.2.50.0070.00316.92
7.2.40.0080.00516.94
7.2.30.0030.00916.98
7.2.20.0040.00917.02
7.2.10.0080.00416.90
7.2.00.0080.00717.84
7.1.250.0020.01215.64
7.1.100.0060.00618.16
7.1.70.0000.00717.14
7.1.60.0540.00914.92
7.1.50.0180.01834.82
7.1.00.0000.08022.57
7.0.200.0030.01316.63
7.0.140.0030.07321.99
7.0.100.0030.08721.79
7.0.90.0070.08721.64
7.0.80.0130.04021.93
7.0.70.0130.07021.78
7.0.60.0130.07721.72
7.0.50.0030.06022.09
7.0.40.0070.07720.10
7.0.30.0030.05020.15
7.0.20.0070.08320.09
7.0.10.0070.08020.07
7.0.00.0100.07020.14
5.6.280.0030.07021.05
5.6.250.0100.05020.63
5.6.240.0070.08020.70
5.6.230.0100.08020.54
5.6.220.0100.04720.49
5.6.210.0100.05720.54
5.6.200.0030.10020.94
5.6.190.0130.07321.03
5.6.180.0000.07721.04
5.6.170.0070.08720.93
5.6.160.0130.04320.95
5.6.150.0030.04721.07
5.6.140.0130.07321.02
5.6.130.0130.07720.93
5.6.120.0100.08720.92
5.6.110.0030.08721.06
5.6.100.0070.07320.98
5.6.90.0100.08321.00
5.6.80.0100.07720.42
5.6.70.0070.04320.46
5.6.60.0070.03720.45
5.6.50.0100.03320.40
5.6.40.0100.03720.36
5.6.30.0030.04320.38
5.6.20.0100.03720.29
5.6.10.0030.03720.39
5.6.00.0070.03320.42
5.5.380.0100.07320.38
5.5.370.0170.07020.39
5.5.360.0100.06320.38
5.5.350.0130.07320.39
5.5.340.0130.07320.80
5.5.330.0070.04320.78
5.5.320.0130.04020.89
5.5.310.0030.08320.88
5.5.300.0070.08020.89
5.5.290.0200.07020.85
5.5.280.0000.09020.90
5.5.270.0030.07720.90
5.5.260.0070.04720.82
5.5.250.0000.08720.73
5.5.240.0070.06320.21
5.5.230.0000.04320.27
5.5.220.0030.04020.27
5.5.210.0030.04020.19
5.5.200.0070.03720.23
5.5.190.0100.05020.21
5.5.180.0000.04320.14
5.5.160.0030.05720.14
5.5.150.0070.04720.10
5.5.140.0100.04320.10
5.5.130.0100.03320.14
5.5.120.0130.05720.14
5.5.110.0100.08020.27
5.5.100.0000.05720.07
5.5.90.0000.03719.95
5.5.80.0030.07020.11
5.5.70.0000.04320.03
5.5.60.0000.04720.01
5.5.50.0030.04320.05
5.5.40.0000.04720.05
5.5.30.0000.04320.03
5.5.20.0070.06319.92
5.5.10.0030.04019.93
5.5.00.0030.08019.96
5.4.450.0030.08019.56
5.4.440.0130.05319.10
5.4.430.0130.07019.44
5.4.420.0130.05319.37
5.4.410.0200.06319.24
5.4.400.0100.04319.15
5.4.390.0100.03319.12
5.4.380.0200.02718.98
5.4.370.0030.03719.17
5.4.360.0070.03319.12
5.4.350.0100.09019.09
5.4.340.0070.03718.98
5.4.320.0000.04719.23
5.4.310.0030.04018.99
5.4.300.0030.03719.23
5.4.290.0070.05719.07
5.4.280.0130.07019.03
5.4.270.0000.07718.94
5.4.260.0000.05719.06
5.4.250.0030.06319.07
5.4.240.0030.03719.11
5.4.230.0030.05018.89
5.4.220.0070.03319.04
5.4.210.0070.03319.05
5.4.200.0030.03719.12
5.4.190.0070.03319.05
5.4.180.0000.04019.04
5.4.170.0130.04318.80
5.4.160.0030.06319.02
5.4.150.0030.03719.12
5.4.140.0000.04016.37
5.4.130.0070.05316.36
5.4.120.0070.04316.38
5.4.110.0000.04316.45
5.4.100.0030.03716.30
5.4.90.0030.03316.38
5.4.80.0030.03316.36
5.4.70.0000.03716.42
5.4.60.0000.03316.33
5.4.50.0000.04016.41
5.4.40.0030.03316.29
5.4.30.0070.06316.37
5.4.20.0000.04016.28
5.4.10.0030.03716.38
5.4.00.0030.04015.79
5.3.290.0030.06014.67
5.3.280.0030.03714.58
5.3.270.0000.04314.58
5.3.260.0000.04714.48
5.3.250.0030.03014.60
5.3.240.0000.04014.45
5.3.230.0000.04714.60
5.3.220.0070.03014.43
5.3.210.0000.04014.54
5.3.200.0030.03714.56
5.3.190.0000.04014.44
5.3.180.0000.04014.48
5.3.170.0070.03314.48
5.3.160.0030.04014.48
5.3.150.0000.05014.41
5.3.140.0100.02714.54
5.3.130.0030.04314.54
5.3.120.0030.04014.38
5.3.110.0030.05314.46
5.3.100.0030.04014.02
5.3.90.0030.03713.89
5.3.80.0000.04013.78
5.3.70.0070.03313.90
5.3.60.0030.07013.99
5.3.50.0070.07313.90
5.3.40.0100.07013.82
5.3.30.0100.03713.91
5.3.20.0100.06713.65
5.3.10.0030.03713.66
5.3.00.0130.06713.50
5.2.170.0030.03310.95
5.2.160.0030.04711.21
5.2.150.0170.05011.18
5.2.140.0070.03011.11
5.2.130.0070.06011.15
5.2.120.0070.06011.07
5.2.110.0070.02711.13
5.2.100.0130.04710.90
5.2.90.0070.03010.93
5.2.80.0000.07011.02
5.2.70.0070.06011.02
5.2.60.0070.03011.10
5.2.50.0070.05710.99
5.2.40.0030.06010.84
5.2.30.0100.05710.94
5.2.20.0030.05310.89
5.2.10.0000.06310.81
5.2.00.0100.04710.78
5.1.60.0030.03010.04
5.1.50.0070.0479.95
5.1.40.0070.04310.03
5.1.30.0030.06010.29
5.1.20.0030.05010.38
5.1.10.0030.05310.06
5.1.00.0000.0339.90
5.0.50.0000.0478.55
5.0.40.0000.0478.41
5.0.30.0030.0638.33
5.0.20.0100.0278.27
5.0.10.0000.0338.03
5.0.00.0030.0678.26
4.4.90.0000.0237.50
4.4.80.0030.0307.50
4.4.70.0000.0277.50
4.4.60.0030.0237.50
4.4.50.0000.0237.50
4.4.40.0000.0277.50
4.4.30.0000.0207.50
4.4.20.0000.0377.50
4.4.10.0000.0377.50
4.4.00.0070.0477.50
4.3.110.0000.0277.50
4.3.100.0000.0337.50
4.3.90.0000.0277.50
4.3.80.0000.0507.50
4.3.70.0100.0237.50
4.3.60.0070.0207.50
4.3.50.0030.0277.50
4.3.40.0000.0537.50
4.3.30.0000.0207.50
4.3.20.0030.0337.50
4.3.10.0070.0307.50
4.3.00.0030.0337.50

preferences:
37 ms | 401 KiB | 5 Q