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); $opadPack = $opad.pack($p[$algo],$hashedIpadData); 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 = 'secret'; $min = 'D544248794'; $invoice = 1234; # XXX Invoice $sum = '22.80'; # XXX Ammount $exp_date = '01.08.2020'; # XXX Expiration date $descr = 'Test'; # XXX Description $data = <<<DATA MIN={$min} INVOICE={$invoice} AMOUNT={$sum} EXP_TIME={$exp_date} DESCR={$descr} 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 <<<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.15
8.3.50.0150.00321.09
8.3.40.0150.00018.84
8.3.30.0090.00620.10
8.3.20.0050.00320.29
8.3.10.0140.00422.13
8.3.00.0040.00422.57
8.2.180.0160.00616.50
8.2.170.0110.00722.96
8.2.160.0110.00420.52
8.2.150.0080.00024.18
8.2.140.0030.01024.66
8.2.130.0060.00326.16
8.2.120.0040.00420.48
8.2.110.0070.00320.61
8.2.100.0090.00317.91
8.2.90.0000.00819.27
8.2.80.0030.00619.20
8.2.70.0060.00317.75
8.2.60.0080.00817.79
8.2.50.0040.00418.07
8.2.40.0040.00418.21
8.2.30.0000.00719.34
8.2.20.0040.00417.63
8.2.10.0040.00417.75
8.2.00.0040.00417.80
8.1.280.0140.00425.92
8.1.270.0000.00723.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0070.00322.60
8.1.230.0030.00920.89
8.1.220.0080.00018.77
8.1.210.0030.00518.81
8.1.200.0060.00317.23
8.1.190.0030.00517.30
8.1.180.0030.00618.10
8.1.170.0060.00318.65
8.1.160.0070.00019.02
8.1.150.0040.00418.58
8.1.140.0040.00417.43
8.1.130.0030.00717.89
8.1.120.0040.00417.39
8.1.110.0000.00817.36
8.1.100.0000.00717.52
8.1.90.0000.00717.50
8.1.80.0000.00717.43
8.1.70.0000.00817.34
8.1.60.0030.00617.58
8.1.50.0000.00817.57
8.1.40.0110.00017.58
8.1.30.0040.00417.70
8.1.20.0040.00417.62
8.1.10.0000.00817.62
8.1.00.0080.00017.42
8.0.300.0000.00719.88
8.0.290.0030.00617.28
8.0.280.0040.00418.42
8.0.270.0000.00817.34
8.0.260.0030.00316.78
8.0.250.0040.00417.07
8.0.240.0040.00417.11
8.0.230.0070.00016.92
8.0.220.0000.00816.99
8.0.210.0070.00016.98
8.0.200.0060.00016.90
8.0.190.0090.00017.00
8.0.180.0040.00416.91
8.0.170.0030.00616.95
8.0.160.0030.00316.98
8.0.150.0040.00316.93
8.0.140.0000.00816.88
8.0.130.0060.00013.38
8.0.120.0000.00816.88
8.0.110.0080.00017.04
8.0.100.0070.00016.93
8.0.90.0000.00716.93
8.0.80.0060.01016.93
8.0.70.0000.00816.80
8.0.60.0040.00416.87
8.0.50.0040.00416.81
8.0.30.0060.01217.20
8.0.20.0170.00517.40
8.0.10.0000.00717.16
8.0.00.0100.00816.84
7.4.330.0000.00515.07
7.4.320.0060.00016.33
7.4.300.0060.00016.60
7.4.290.0000.00716.59
7.4.280.0000.00716.46
7.4.270.0000.00716.42
7.4.260.0060.00013.29
7.4.250.0080.00016.59
7.4.240.0000.00716.59
7.4.230.0030.00316.43
7.4.220.0070.01016.65
7.4.210.0070.00816.54
7.4.200.0040.00316.55
7.4.190.0000.00716.80
7.4.160.0100.00616.42
7.4.150.0090.00917.40
7.4.140.0130.00817.86
7.4.130.0050.01216.53
7.4.120.0070.01116.74
7.4.110.0090.00916.60
7.4.100.0100.01016.61
7.4.90.0100.00716.52
7.4.80.0060.01119.39
7.4.70.0130.00416.73
7.4.60.0090.00616.39
7.4.50.0000.00816.55
7.4.40.0100.00722.77
7.4.30.0090.01216.60
7.4.00.0030.01215.20
7.3.330.0000.00513.24
7.3.320.0030.00313.22
7.3.310.0070.00016.51
7.3.300.0000.00616.32
7.3.290.0100.00316.50
7.3.280.0100.00616.46
7.3.270.0160.00017.40
7.3.260.0090.01516.44
7.3.250.0120.00516.47
7.3.240.0120.01216.59
7.3.230.0100.00716.67
7.3.210.0150.00416.60
7.3.200.0090.00719.39
7.3.190.0070.01016.54
7.3.180.0040.01616.27
7.3.170.0060.01516.57
7.3.160.0080.00816.61
7.3.120.0070.01014.79
7.3.10.0030.00916.66
7.3.00.0120.00616.54
7.2.330.0080.00816.86
7.2.320.0070.01116.80
7.2.310.0130.00316.69
7.2.300.0080.01316.53
7.2.290.0110.00616.54
7.2.130.0030.01016.93
7.2.120.0000.01317.00
7.2.110.0060.00616.96
7.2.100.0080.00417.05
7.2.90.0030.01316.94
7.2.80.0120.00317.02
7.2.70.0120.00316.86
7.2.60.0100.00716.73
7.2.50.0100.00716.89
7.2.40.0090.00917.13
7.2.30.0090.00617.00
7.2.20.0070.00717.07
7.2.10.0070.00717.01
7.2.00.0060.00818.17
7.1.250.0070.00415.82
7.1.100.0030.00618.21
7.1.70.0000.00816.89
7.1.60.0060.01319.17
7.1.50.0100.01417.09
7.1.00.0000.08022.36
7.0.200.0050.00216.89
7.0.140.0100.06722.00
7.0.100.0270.05319.93
7.0.90.0070.05019.88
7.0.80.0170.03719.99
7.0.70.0130.06719.92
7.0.60.0030.08319.97
7.0.50.0030.05320.26
7.0.40.0100.07320.09
7.0.30.0130.07720.09
7.0.20.0130.07720.09
7.0.10.0100.07720.13
7.0.00.0100.08020.10
5.6.280.0030.07320.90
5.6.250.0030.08020.49
5.6.240.0070.08020.76
5.6.230.0100.06020.58
5.6.220.0070.06320.63
5.6.210.0030.07720.57
5.6.200.0100.04721.11
5.6.190.0070.08021.19
5.6.180.0030.04321.19
5.6.170.0200.05721.07
5.6.160.0000.06321.18
5.6.150.0030.05321.16
5.6.140.0030.05021.07
5.6.130.0170.07321.06
5.6.120.0100.04021.15
5.6.110.0170.07321.09
5.6.100.0000.09021.08
5.6.90.0070.05021.00
5.6.80.0230.06720.54
5.6.70.0030.04020.57
5.6.60.0000.04720.39
5.6.50.0130.07720.42
5.6.40.0100.04320.34
5.6.30.0000.08320.42
5.6.20.0170.06020.41
5.6.10.0030.08720.32
5.6.00.0070.07720.45
5.5.380.0130.06320.36
5.5.370.0000.05020.38
5.5.360.0130.04720.54
5.5.350.0030.08720.43
5.5.340.0030.08720.88
5.5.330.0130.07320.79
5.5.320.0100.07720.95
5.5.310.0130.07320.88
5.5.300.0030.05020.84
5.5.290.0030.05020.81
5.5.280.0070.05320.93
5.5.270.0170.06720.93
5.5.260.0070.04720.64
5.5.250.0030.07320.69
5.5.240.0070.08020.33
5.5.230.0030.04020.17
5.5.220.0100.05720.22
5.5.210.0070.07720.11
5.5.200.0100.07720.14
5.5.190.0130.03320.25
5.5.180.0100.07320.23
5.5.160.0100.07320.17
5.5.150.0100.07720.28
5.5.140.0030.04320.20
5.5.130.0100.06720.25
5.5.120.0100.05720.27
5.5.110.0100.06720.00
5.5.100.0100.06720.09
5.5.90.0100.07320.12
5.5.80.0130.07719.99
5.5.70.0130.07320.16
5.5.60.0000.05320.15
5.5.50.0130.02720.01
5.5.40.0100.07019.97
5.5.30.0070.07719.95
5.5.20.0000.08720.07
5.5.10.0000.04320.13
5.5.00.0000.04720.14
5.4.450.0070.08019.46
5.4.440.0070.07719.55
5.4.430.0030.07019.50
5.4.420.0070.04019.48
5.4.410.0130.07019.29
5.4.400.0000.05018.89
5.4.390.0030.06018.95
5.4.380.0030.04019.23
5.4.370.0070.04318.88
5.4.360.0100.07019.14
5.4.350.0070.07719.11
5.4.340.0100.06019.17
5.4.320.0130.06319.13
5.4.310.0070.04319.05
5.4.300.0070.07318.95
5.4.290.0070.07319.09
5.4.280.0100.07319.13
5.4.270.0000.04018.84
5.4.260.0000.04318.85
5.4.250.0200.06019.23
5.4.240.0070.06319.04
5.4.230.0030.06018.91
5.4.220.0000.04319.04
5.4.210.0070.05719.03
5.4.200.0200.06719.12
5.4.190.0100.07019.20
5.4.180.0070.07319.15
5.4.170.0030.08719.22
5.4.160.0070.03319.14
5.4.150.0000.04319.11
5.4.140.0030.04016.43
5.4.130.0130.06316.43
5.4.120.0030.07316.41
5.4.110.0000.04016.47
5.4.100.0070.03316.50
5.4.90.0030.07316.45
5.4.80.0000.07716.50
5.4.70.0030.07716.46
5.4.60.0030.08716.48
5.4.50.0000.06316.45
5.4.40.0030.07716.35
5.4.30.0070.06716.41
5.4.20.0000.05716.30
5.4.10.0030.04016.25
5.4.00.0030.03315.80
5.3.290.0030.07314.76
5.3.280.0100.07014.73
5.3.270.0030.07314.68
5.3.260.0070.07014.60
5.3.250.0030.03714.73
5.3.240.0070.07014.62
5.3.230.0130.02714.67
5.3.220.0070.07714.57
5.3.210.0030.08014.57
5.3.200.0100.06314.51
5.3.190.0070.07314.51
5.3.180.0030.06014.60
5.3.170.0130.03014.62
5.3.160.0030.07314.65
5.3.150.0030.07714.59
5.3.140.0100.06014.64
5.3.130.0030.05014.50
5.3.120.0030.03714.68
5.3.110.0100.07714.52
5.3.100.0000.03714.07
5.3.90.0070.07014.02
5.3.80.0130.07014.01
5.3.70.0070.07014.01
5.3.60.0030.07714.00
5.3.50.0070.06713.98
5.3.40.0070.03013.89
5.3.30.0170.06013.96
5.3.20.0070.03313.63
5.3.10.0000.05313.77
5.3.00.0030.07013.72
5.2.170.0070.04311.17
5.2.160.0000.04711.15
5.2.150.0030.03011.21
5.2.140.0000.03011.19
5.2.130.0000.05310.98
5.2.120.0030.05011.17
5.2.110.0100.04711.21
5.2.100.0100.05711.05
5.2.90.0000.05711.03
5.2.80.0030.05011.13
5.2.70.0000.03311.10
5.2.60.0030.06711.16
5.2.50.0000.06311.13
5.2.40.0130.05011.00
5.2.30.0000.03710.85
5.2.20.0000.03011.06
5.2.10.0070.05710.91
5.2.00.0100.04010.69
5.1.60.0000.06010.04
5.1.50.0030.04310.11
5.1.40.0030.03710.00
5.1.30.0000.05010.46
5.1.20.0070.05310.48
5.1.10.0000.06010.10
5.1.00.0000.0279.95
5.0.50.0070.0439.43
5.0.40.0030.0239.43
5.0.30.0000.0639.43
5.0.20.0030.0439.43
5.0.10.0070.0279.43
5.0.00.0000.0639.43
4.4.90.0000.0239.43
4.4.80.0030.0339.43
4.4.70.0030.0279.43
4.4.60.0070.0379.43
4.4.50.0000.0379.43
4.4.40.0030.0339.43
4.4.30.0030.0379.43
4.4.20.0000.0279.43
4.4.10.0030.0279.43
4.4.00.0030.0409.43
4.3.110.0030.0209.43
4.3.100.0000.0139.43
4.3.90.0070.0109.43
4.3.80.0000.0479.43
4.3.70.0030.0279.43
4.3.60.0000.0339.43
4.3.50.0030.0179.43
4.3.40.0030.0509.43
4.3.30.0000.0339.43
4.3.20.0070.0309.43
4.3.10.0030.0279.43
4.3.00.0030.0309.43

preferences:
50.52 ms | 400 KiB | 5 Q