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.0150.00018.30
8.3.50.0130.00421.14
8.3.40.0120.00318.54
8.3.30.0090.00920.29
8.3.20.0060.00320.39
8.3.10.0140.00022.15
8.3.00.0050.00322.36
8.2.180.0120.00816.63
8.2.170.0070.00722.96
8.2.160.0100.00320.47
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.72
8.2.110.0080.00019.30
8.2.100.0110.00017.87
8.2.90.0030.00619.30
8.2.80.0000.00819.37
8.2.70.0080.00017.75
8.2.60.0040.00418.03
8.2.50.0050.00318.07
8.2.40.0030.00618.23
8.2.30.0040.00419.57
8.2.20.0040.00417.68
8.2.10.0060.00317.85
8.2.00.0080.00317.70
8.1.280.0120.00325.92
8.1.270.0060.00323.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00622.42
8.1.230.0080.00420.97
8.1.220.0050.00318.77
8.1.210.0000.00819.02
8.1.200.0000.01017.25
8.1.190.0000.00817.43
8.1.180.0030.00618.10
8.1.170.0000.00818.47
8.1.160.0030.00518.98
8.1.150.0040.00418.63
8.1.140.0000.00717.40
8.1.130.0030.00317.75
8.1.120.0000.00717.41
8.1.110.0000.00717.46
8.1.100.0040.00417.52
8.1.90.0070.00017.56
8.1.80.0040.00417.51
8.1.70.0000.00717.49
8.1.60.0040.00417.62
8.1.50.0000.00817.50
8.1.40.0080.00317.52
8.1.30.0030.00517.69
8.1.20.0000.00817.68
8.1.10.0000.00817.59
8.1.00.0080.00017.45
8.0.300.0040.00419.96
8.0.290.0080.00017.18
8.0.280.0040.00418.59
8.0.270.0000.00717.30
8.0.260.0030.00316.84
8.0.250.0000.00717.05
8.0.240.0030.00517.09
8.0.230.0000.00716.94
8.0.220.0000.00716.97
8.0.210.0070.00016.89
8.0.200.0070.00017.07
8.0.190.0040.00417.07
8.0.180.0000.00817.04
8.0.170.0000.00817.10
8.0.160.0000.00717.10
8.0.150.0040.00417.02
8.0.140.0060.00317.01
8.0.130.0050.00013.43
8.0.120.0030.00617.00
8.0.110.0040.00416.87
8.0.100.0050.00316.96
8.0.90.0000.00917.04
8.0.80.0090.00617.07
8.0.70.0040.00416.82
8.0.60.0030.00517.05
8.0.50.0040.00417.12
8.0.30.0110.00716.95
8.0.20.0130.00617.40
8.0.10.0040.00416.87
8.0.00.0110.00816.90
7.4.330.0000.00516.83
7.4.320.0030.00316.56
7.4.300.0040.00416.60
7.4.290.0000.00716.65
7.4.280.0030.00316.54
7.4.270.0050.00316.70
7.4.260.0050.00013.29
7.4.250.0000.00716.52
7.4.240.0050.00216.53
7.4.230.0040.00416.73
7.4.220.0040.01316.61
7.4.210.0130.00316.58
7.4.200.0070.00016.46
7.4.190.0070.00016.61
7.4.160.0050.01516.50
7.4.150.0090.00917.40
7.4.140.0080.00817.86
7.4.130.0090.00916.66
7.4.120.0120.00616.67
7.4.110.0110.00916.58
7.4.100.0090.00916.64
7.4.90.0090.00916.60
7.4.80.0210.00419.39
7.4.70.0080.00816.68
7.4.60.0070.01016.57
7.4.50.0000.00916.66
7.4.40.0060.00922.77
7.4.30.0030.01716.52
7.4.00.0030.00915.06
7.3.330.0000.00513.55
7.3.320.0000.00613.48
7.3.310.0070.00016.30
7.3.300.0030.00316.34
7.3.290.0100.00316.46
7.3.280.0120.00616.43
7.3.270.0090.00917.40
7.3.260.0110.01116.47
7.3.250.0150.00516.55
7.3.240.0150.00316.45
7.3.230.0070.01116.46
7.3.210.0130.00316.52
7.3.200.0130.01119.39
7.3.190.0100.00716.68
7.3.180.0110.00716.47
7.3.170.0060.01616.48
7.3.160.0080.00816.50
7.3.120.0030.01314.93
7.3.10.0070.01016.64
7.3.00.0090.00616.46
7.2.330.0100.00716.59
7.2.320.0060.01616.86
7.2.310.0060.01216.82
7.2.300.0140.01116.66
7.2.290.0030.01316.80
7.2.130.0110.00417.00
7.2.120.0030.01316.68
7.2.110.0000.01016.95
7.2.100.0090.00617.05
7.2.90.0090.00616.89
7.2.80.0070.00417.05
7.2.70.0070.01016.92
7.2.60.0060.00616.75
7.2.50.0040.01117.07
7.2.40.0040.01116.87
7.2.30.0000.01617.13
7.2.20.0090.00316.92
7.2.10.0000.01617.05
7.2.00.0030.01218.12
7.1.250.0030.01315.82
7.1.200.0050.00315.90
7.1.100.0180.00716.21
7.1.70.0000.00716.98
7.1.60.0070.01019.17
7.1.50.0070.01416.97
7.1.00.0000.05322.51
7.0.200.0000.00816.79
7.0.140.0000.08022.10
7.0.80.0530.08319.96
7.0.70.0130.05719.98
7.0.60.0130.08320.01
7.0.50.0530.07320.34
7.0.40.0070.05319.98
7.0.30.0070.05020.05
7.0.20.0130.06720.07
7.0.10.0100.07320.09
7.0.00.0030.08720.09
5.6.280.0030.07321.12
5.6.230.0070.07020.61
5.6.220.0100.08020.63
5.6.210.0230.06720.61
5.6.200.0130.07321.05
5.6.190.0100.07020.96
5.6.180.0100.06720.98
5.6.170.0070.08721.04
5.6.160.0070.04721.06
5.6.150.0030.08320.95
5.6.140.0030.08021.07
5.6.130.0070.07321.05
5.6.120.0170.06720.95
5.6.110.0030.09020.95
5.6.100.0000.05720.95
5.6.90.0100.07720.92
5.6.80.0100.07720.46
5.6.70.0170.07020.46
5.6.60.0130.05720.50
5.6.50.0170.04720.54
5.6.40.0030.08020.48
5.6.30.0070.08020.39
5.6.20.0030.05020.41
5.6.10.0170.07320.43
5.6.00.0030.04320.45
5.5.370.0070.08020.38
5.5.360.0100.08020.34
5.5.350.0270.06320.35
5.5.340.0070.06320.91
5.5.330.0100.07320.93
5.5.320.0000.04720.91
5.5.310.0130.05020.78
5.5.300.0070.07020.92
5.5.290.0070.07020.88
5.5.280.0070.05320.84
5.5.270.0130.08020.81
5.5.260.0000.08720.80
5.5.250.0070.08020.56
5.5.240.0030.07720.32
5.5.230.0100.08320.29
5.5.220.0130.07720.20
5.5.210.0100.07020.22
5.5.200.0070.08020.30
5.5.190.0070.04320.26
5.5.180.0030.08720.24
5.5.160.0070.04320.19
5.5.150.0070.05720.27
5.5.140.0100.03720.19
5.5.130.0000.07020.23
5.5.120.0130.03320.25
5.5.110.0070.04020.18
5.5.100.0070.07720.07
5.5.90.0200.06720.14
5.5.80.0100.06020.13
5.5.70.0000.08320.10
5.5.60.0000.04320.10
5.5.50.0100.07020.05
5.5.40.0000.07320.07
5.5.30.0100.08019.95
5.5.20.0170.06720.03
5.5.10.0070.04720.07
5.5.00.0030.08320.06
5.4.450.0030.08319.56
5.4.440.0000.04319.48
5.4.430.0100.07719.41
5.4.420.0070.06019.35
5.4.410.0130.07019.23
5.4.400.0030.08019.05
5.4.390.0100.07719.09
5.4.380.0070.07018.85
5.4.370.0130.05019.04
5.4.360.0130.05019.18
5.4.350.0100.07019.09
5.4.340.0070.07018.90
5.4.320.0130.06319.15
5.4.310.0070.07319.21
5.4.300.0070.06319.16
5.4.290.0100.05019.15
5.4.280.0030.04019.07
5.4.270.0030.08019.09
5.4.260.0070.07018.95
5.4.250.0100.05018.85
5.4.240.0170.06719.13
5.4.230.0000.08319.03
5.4.220.0070.05319.16
5.4.210.0000.04719.02
5.4.200.0070.07719.06
5.4.190.0030.08019.07
5.4.180.0070.08318.89
5.4.170.0030.07718.81
5.4.160.0100.07719.13
5.4.150.0030.06718.88
5.4.140.0000.04016.42
5.4.130.0000.08316.33
5.4.120.0030.03716.20
5.4.110.0030.03716.43
5.4.100.0000.04016.44
5.4.90.0030.07016.38
5.4.80.0030.03316.38
5.4.70.0000.04016.46
5.4.60.0030.03316.34
5.4.50.0030.05016.37
5.4.40.0070.07316.49
5.4.30.0030.05716.45
5.4.20.0070.07316.48
5.4.10.0130.07016.44
5.4.00.0100.06015.87
5.3.290.0030.08314.63
5.3.280.0130.06714.63
5.3.270.0070.07314.74
5.3.260.0070.04714.70
5.3.250.0030.04714.61
5.3.240.0030.04314.60
5.3.230.0000.04014.63
5.3.220.0100.05014.53
5.3.210.0030.04014.72
5.3.200.0030.05314.55
5.3.190.0130.05314.67
5.3.180.0000.04014.57
5.3.170.0030.07314.58
5.3.160.0030.07714.64
5.3.150.0100.06314.50
5.3.140.0000.04014.63
5.3.130.0030.05714.62
5.3.120.0070.04014.63
5.3.110.0100.07314.55
5.3.100.0300.05714.03
5.3.90.0030.07314.09
5.3.80.0030.07313.96
5.3.70.0100.07313.93
5.3.60.0030.07314.13
5.3.50.0200.06714.03
5.3.40.0070.07713.89
5.3.30.0030.07313.94
5.3.20.0130.06313.77
5.3.10.0100.06713.65
5.3.00.0070.06013.77
5.2.170.0030.06013.58
5.2.160.0100.05313.58
5.2.150.0000.04313.58
5.2.140.0070.06013.58
5.2.130.0030.05013.58
5.2.120.0030.04313.58
5.2.110.0100.05313.58
5.2.100.0030.05713.58
5.2.90.0030.06313.58
5.2.80.0030.06313.58
5.2.70.0030.06313.58
5.2.60.0070.05713.58
5.2.50.0030.04013.58
5.2.40.0000.05013.58
5.2.30.0130.05713.58
5.2.20.0030.06013.58
5.2.10.0070.05313.58
5.2.00.0030.06313.58
5.1.60.0000.05713.58
5.1.50.0070.05013.58
5.1.40.0030.05713.58
5.1.30.0070.03313.58
5.1.20.0030.06013.58
5.1.10.0030.05713.58
5.1.00.0070.02713.58
5.0.50.0070.04313.58
5.0.40.0030.03713.58
5.0.30.0070.05013.58
5.0.20.0030.03313.58
5.0.10.0130.03313.58
5.0.00.0000.06313.58
4.4.90.0100.02713.58
4.4.80.0000.03313.58
4.4.70.0000.03313.58
4.4.60.0000.03713.58
4.4.50.0070.03013.58
4.4.40.0030.04713.58
4.4.30.0000.02313.58
4.4.20.0000.02313.58
4.4.10.0000.03713.58
4.4.00.0070.05013.58
4.3.110.0030.03313.58
4.3.100.0030.03013.58
4.3.90.0070.03013.58
4.3.80.0030.04313.58
4.3.70.0000.02713.58
4.3.60.0000.03713.58
4.3.50.0030.03313.58
4.3.40.0030.04313.58
4.3.30.0070.03013.58
4.3.20.0030.03313.58
4.3.10.0000.04013.58
4.3.00.0000.04013.58

preferences:
43.5 ms | 401 KiB | 5 Q