3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Enter your code here, enjoy! function hmac($algo,$data,$passwd){ /* md5 and sha1 only */ $algo=strtolower($algo); echo $algo; $p=array('md5'=>'greatherH32','sha1'=>'H40'); if(strlen($passwd)>64) { $passwd=pack($p[$algo],$algo($passwd)); //echo 'pass greater than 64'.chr(13); //echo $passwd; } if(strlen($passwd)<64) { $passwd=str_pad($passwd,64,chr(0)); //echo 'pass smaller than 64'.chr(13); //echo $passwd; } $ipad=substr($passwd,0,64) ^ str_repeat(chr(0x36),64); echo 'ipad: '.$ipad.chr(13); $opad=substr($passwd,0,64) ^ str_repeat(chr(0x5C),64); echo 'opad: '.$opad.chr(13); $hashedIpadData =$algo($ipad.$data); echo 'hashedIpadData: '.$hashedIpadData.chr(13); $packedIpdatData=pack($p[$algo],$hashedIpadData); echo 'packedIpdatData: '.$packedIpdatData.chr(13); $opadPack = $opad.$packedIpdatData; echo 'opadPack: '.$opadPack.chr(13); return $algo($opadPack); } # XXX ePay.bg URL (https://devep2.datamax.bg/ep2/epay2_demo/ if POST to DEMO system) $submit_url = 'https://devep2.datamax.bg/ep2/epay2_demo/'; # XXX Secret word with which merchant make CHECKSUM on the ENCODED packet $secret = 'YYBW64GVCVRRP5759A0QFDRXBYZQF5HV3SLTYN14RTWGRPTX8YF2R5UUET7BCT6E'; $min = 'D544248794'; $invoice = '173910'; # XXX Invoice $sum = '16.99'; # XXX Ammount $exp_date = '08.01.2014 12:24:44'; # XXX Expiration date $descr = 'Order: 173910, Product: 9626'; # XXX Description $data = <<<DATA MIN={$min} INVOICE={$invoice} AMOUNT={$sum} EXP_TIME={$exp_date} DESCR={$descr} ENCODING=utf-8 DATA; # XXX Packet: # (MIN or EMAIL)= REQUIRED # INVOICE= REQUIRED # AMOUNT= REQUIRED # EXP_TIME= REQUIRED # DESCR= OPTIONAL $ENCODED = base64_encode($data); $CHECKSUM = hmac('sha1', $ENCODED, $secret); # XXX SHA-1 algorithm REQUIRED echo mb_internal_encoding() . '<br />'; echo mb_regex_encoding(); echo <<<HTML <HTML> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1251"> </head> <BODY TEXT=#000000 BGCOLOR=#FFFFFF> <p>{$ENCODED}</p> <p>{$CHECKSUM}</p> HTML; ?>

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)
8.3.60.0120.00318.08
8.3.50.0110.00717.32
8.3.40.0150.00018.98
8.3.30.0090.00918.90
8.3.20.0050.00318.77
8.3.10.0080.00020.56
8.3.00.0080.00017.75
8.2.180.0120.00918.29
8.2.170.0120.00322.96
8.2.160.0130.00022.20
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0070.00019.89
8.2.110.0000.00921.02
8.2.100.0090.00317.97
8.2.90.0030.00519.36
8.2.80.0000.00817.97
8.2.70.0000.00817.74
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0030.00618.34
8.2.30.0040.00418.17
8.2.20.0080.00017.63
8.2.10.0080.00017.69
8.2.00.0000.00817.84
8.1.280.0150.00625.92
8.1.270.0040.00423.99
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0040.00720.81
8.1.230.0070.00421.04
8.1.220.0050.00318.77
8.1.210.0040.00418.98
8.1.200.0030.00717.38
8.1.190.0050.00317.52
8.1.180.0030.00618.10
8.1.170.0050.00318.87
8.1.160.0040.00419.00
8.1.150.0040.00418.60
8.1.140.0000.00717.48
8.1.130.0030.00317.91
8.1.120.0000.00717.52
8.1.110.0050.00317.44
8.1.100.0000.00717.50
8.1.90.0090.00017.50
8.1.80.0000.00817.42
8.1.70.0040.00417.43
8.1.60.0000.00917.59
8.1.50.0070.00017.38
8.1.40.0000.00717.52
8.1.30.0040.00417.60
8.1.20.0030.00517.76
8.1.10.0000.00717.63
8.1.00.0080.00017.44
8.0.300.0050.00220.20
8.0.290.0090.00016.75
8.0.280.0020.00518.49
8.0.270.0030.00317.21
8.0.260.0030.00318.63
8.0.250.0000.00717.09
8.0.240.0000.00716.93
8.0.230.0000.00817.05
8.0.220.0000.00716.96
8.0.210.0070.00016.96
8.0.200.0000.00617.09
8.0.190.0000.00717.12
8.0.180.0050.00217.02
8.0.170.0060.00316.93
8.0.160.0030.00316.95
8.0.150.0040.00616.84
8.0.140.0060.00616.99
8.0.130.0100.00013.38
8.0.120.0070.00016.84
8.0.110.0080.00016.93
8.0.100.0000.00716.95
8.0.90.0000.00816.97
8.0.80.0060.00916.95
8.0.70.0040.00416.96
8.0.60.0040.00416.88
8.0.50.0000.00716.86
8.0.30.0090.01017.04
8.0.20.0130.00717.23
8.0.10.0000.00717.08
8.0.00.0130.00816.89
7.4.330.0000.00514.82
7.4.320.0000.00616.40
7.4.300.0000.00616.56
7.4.290.0070.00016.54
7.4.280.0030.00616.56
7.4.270.0030.00316.66
7.4.260.0000.00513.38
7.4.250.0030.00616.48
7.4.240.0020.00516.65
7.4.230.0040.00416.29
7.4.220.0090.01116.50
7.4.210.0070.01016.65
7.4.200.0040.00416.54
7.4.190.0050.00316.73
7.4.160.0060.01216.43
7.4.150.0120.00617.07
7.4.140.0110.00917.34
7.4.130.0160.00116.60
7.4.120.0100.01016.53
7.4.110.0120.00616.75
7.4.100.0140.00816.61
7.4.90.0060.01216.65
7.4.80.0130.00318.80
7.4.70.0080.00816.43
7.4.60.0100.00716.51
7.4.50.0000.00816.37
7.4.40.0060.00922.27
7.4.30.0130.00316.64
7.4.00.0070.01015.19
7.3.330.0030.00313.46
7.3.320.0000.00513.43
7.3.310.0000.00716.52
7.3.300.0030.00316.47
7.3.290.0000.01316.38
7.3.280.0090.00716.47
7.3.270.0060.01217.07
7.3.260.0100.01318.24
7.3.250.0120.01016.44
7.3.240.0080.00816.71
7.3.230.0160.00316.75
7.3.210.0070.01716.48
7.3.200.0080.00819.39
7.3.190.0150.00616.52
7.3.180.0090.00916.66
7.3.170.0140.00316.41
7.3.160.0130.00316.43
7.3.120.0070.01014.94
7.2.330.0060.01316.63
7.2.320.0140.00216.77
7.2.310.0030.01516.59
7.2.300.0110.02016.57
7.2.290.0060.01316.86
7.2.00.0030.01019.45
7.1.100.0100.00718.37
7.1.70.0000.00817.26
7.1.60.0170.00719.40
7.1.50.0030.01016.99
7.1.00.0100.04322.49
7.0.200.0040.00416.56
7.0.140.0070.07022.00
7.0.60.0100.07719.87
7.0.50.0070.04017.77
7.0.40.0030.09020.24
7.0.30.0470.06320.16
7.0.20.0130.04320.10
7.0.10.0070.09020.16
7.0.00.0270.04020.29
5.6.280.0030.07321.09
5.6.210.0070.04320.76
5.6.200.0100.08318.13
5.6.190.0070.09020.48
5.6.180.0170.07320.52
5.6.170.0300.06720.48
5.6.160.0130.03720.69
5.6.150.0200.06318.12
5.6.140.0170.07018.18
5.6.130.0100.06318.28
5.6.120.0100.03721.04
5.6.110.0000.08721.05
5.6.100.0100.08321.04
5.6.90.0130.08320.89
5.6.80.0100.07320.45
5.5.350.0070.07720.44
5.5.340.0070.07317.97
5.5.330.0000.08720.31
5.5.320.0230.04320.24
5.5.310.0200.04720.32
5.5.300.0200.06717.95
5.5.290.0070.08317.98
5.5.280.0070.04020.77
5.5.270.0030.04320.80
5.5.260.0030.04320.78
5.5.250.0000.07320.60
5.5.240.0300.07020.17
5.4.450.0100.07719.41
5.4.440.0230.06719.48
5.4.430.0030.08019.28
5.4.420.0170.07319.25
5.4.410.0070.04719.40
5.4.400.0100.07018.86
5.4.390.0030.07719.20
5.4.380.0100.03318.86
5.4.370.0030.07719.19
5.4.360.0070.04719.25
5.4.350.0100.07719.08
5.4.340.0030.05018.84
5.4.320.0130.07319.17
5.4.310.0070.04018.97
5.4.300.0230.06319.12
5.4.290.0100.07719.11
5.4.280.0030.04719.21
5.4.270.0070.05318.84
5.4.260.0030.04019.12
5.4.250.0070.07719.14
5.4.240.0070.05319.23
5.4.230.0130.06318.99
5.4.220.0100.05019.18
5.4.210.0070.07319.11
5.4.200.0070.08019.20
5.4.190.0170.06718.86
5.4.180.0070.04718.99
5.4.170.0130.07319.10
5.4.160.0030.08319.19
5.4.150.0100.07319.22
5.4.140.0070.07316.50
5.4.130.0030.07316.33
5.4.120.0130.06316.38
5.4.110.0070.05316.39
5.4.100.0100.03016.41
5.4.90.0070.03316.39
5.4.80.0000.03716.52
5.4.70.0070.03016.46
5.4.60.0000.03716.47
5.4.50.0030.04316.39
5.4.40.0000.03716.47
5.4.30.0070.03016.42
5.4.20.0030.03316.49
5.4.10.0000.03716.37
5.4.00.0070.03715.82
5.3.290.0130.04014.69
5.3.280.0070.07714.66
5.3.270.0030.04314.63
5.3.260.0070.06014.67
5.3.250.0000.05314.63
5.3.240.0070.04014.65
5.3.230.0100.04014.66
5.3.220.0030.05014.59
5.3.210.0100.07014.73
5.3.200.0070.04014.47
5.3.190.0070.03314.59
5.3.180.0030.03714.58
5.3.170.0030.03714.61
5.3.160.0030.03714.47
5.3.150.0070.03314.61
5.3.140.0070.03314.63
5.3.130.0070.03714.56
5.3.120.0030.05714.61
5.3.110.0030.04014.45
5.3.100.0000.04014.06
5.3.90.0030.03714.04
5.3.80.0030.03714.04
5.3.70.0000.04014.09
5.3.60.0130.03013.98
5.3.50.0000.04013.85
5.3.40.0030.03713.98
5.3.30.0000.03713.82
5.3.20.0000.04013.74
5.3.10.0030.03713.83
5.3.00.0070.03013.73
5.2.170.0030.02711.22
5.2.160.0070.03011.16
5.2.150.0000.03011.21
5.2.140.0000.03311.22
5.2.130.0030.03311.17
5.2.120.0030.02711.16
5.2.110.0070.02711.18
5.2.100.0030.02711.18
5.2.90.0030.03011.18
5.2.80.0070.02311.16
5.2.70.0070.02311.06
5.2.60.0000.03711.12
5.2.50.0070.02311.11
5.2.40.0030.02711.07
5.2.30.0030.03010.88
5.2.20.0030.03011.03
5.2.10.0030.02710.90
5.2.00.0030.02710.78
5.1.60.0000.02310.05
5.1.50.0000.0279.94
5.1.40.0000.02310.06
5.1.30.0070.02010.44
5.1.20.0070.02310.45
5.1.10.0000.02710.13
5.1.00.0000.03010.01
5.0.50.0030.0338.59
5.0.40.0000.0308.41
5.0.30.0000.0638.41
5.0.20.0070.0408.41
5.0.10.0000.0378.41
5.0.00.0070.0508.41
4.4.90.0000.0178.24
4.4.80.0000.0138.27
4.4.70.0000.0178.33
4.4.60.0070.0108.34
4.4.50.0030.0138.35
4.4.40.0000.0238.41
4.4.30.0000.0178.41
4.4.20.0030.0138.41
4.4.10.0000.0208.41
4.4.00.0030.0378.41
4.3.110.0030.0208.41
4.3.100.0030.0208.41
4.3.90.0030.0338.41
4.3.80.0000.0508.41
4.3.70.0030.0338.41
4.3.60.0000.0308.41
4.3.50.0030.0208.41
4.3.40.0000.0538.41
4.3.30.0000.0208.41
4.3.20.0000.0178.41
4.3.10.0000.0378.41
4.3.00.0000.0378.41

preferences:
41.82 ms | 401 KiB | 5 Q