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'; echo $passwd; } if(strlen($passwd)<64) { $passwd=str_pad($passwd,64,chr(0)); echo 'pass smaller than 64'; echo $passwd; } $ipad=substr($passwd,0,64) ^ str_repeat(chr(0x36),64); echo 'ipad: '.$ipad; $opad=substr($passwd,0,64) ^ str_repeat(chr(0x5C),64); echo 'opad: '.$opad; $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.0100.01018.20
8.3.50.0210.01021.21
8.3.40.0040.01118.91
8.3.30.0070.00720.31
8.3.20.0040.00420.21
8.3.10.0040.01421.75
8.3.00.0080.00022.52
8.2.180.0090.01316.50
8.2.170.0150.00022.96
8.2.160.0030.01020.53
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00320.69
8.2.110.0070.00320.57
8.2.100.0060.00617.91
8.2.90.0030.00619.30
8.2.80.0080.00019.28
8.2.70.0060.00317.71
8.2.60.0110.00018.16
8.2.50.0040.00418.07
8.2.40.0000.00818.15
8.2.30.0050.00319.34
8.2.20.0000.00717.73
8.2.10.0030.00517.86
8.2.00.0040.00417.69
8.1.280.0090.00625.92
8.1.270.0070.00023.99
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0000.01022.67
8.1.230.0000.01220.99
8.1.220.0040.00418.77
8.1.210.0080.00018.98
8.1.200.0030.00617.23
8.1.190.0000.00817.66
8.1.180.0040.00418.10
8.1.170.0030.00618.63
8.1.160.0050.00319.02
8.1.150.0040.00418.62
8.1.140.0000.00717.34
8.1.130.0000.00917.75
8.1.120.0000.00717.46
8.1.110.0040.00417.46
8.1.100.0080.00017.31
8.1.90.0040.00417.33
8.1.80.0070.00017.38
8.1.70.0030.00317.38
8.1.60.0040.00417.58
8.1.50.0000.00817.48
8.1.40.0030.00717.55
8.1.30.0000.00817.61
8.1.20.0040.00417.72
8.1.10.0030.00517.49
8.1.00.0040.00417.55
8.0.300.0000.00719.98
8.0.290.0040.00417.05
8.0.280.0050.00318.49
8.0.270.0030.00317.29
8.0.260.0030.00316.89
8.0.250.0030.00317.08
8.0.240.0000.00817.07
8.0.230.0000.00716.95
8.0.220.0030.00317.00
8.0.210.0030.00316.87
8.0.200.0060.00017.00
8.0.190.0040.00417.04
8.0.180.0070.00017.03
8.0.170.0040.00417.03
8.0.160.0000.00716.91
8.0.150.0000.00816.89
8.0.140.0030.00616.97
8.0.130.0050.00013.39
8.0.120.0050.00316.94
8.0.110.0000.00716.98
8.0.100.0000.00817.08
8.0.90.0050.00316.92
8.0.80.0090.00616.94
8.0.70.0050.00217.00
8.0.60.0000.00817.02
8.0.50.0040.00416.81
8.0.30.0130.00617.13
8.0.20.0080.01217.40
8.0.10.0040.00416.93
8.0.00.0150.00316.73
7.4.330.0030.00315.00
7.4.320.0000.00716.51
7.4.300.0060.00016.63
7.4.290.0000.00616.43
7.4.280.0030.00316.43
7.4.270.0070.00016.48
7.4.260.0030.00313.32
7.4.250.0050.00316.56
7.4.240.0050.00216.59
7.4.230.0040.00416.61
7.4.220.0120.00616.64
7.4.210.0140.00516.54
7.4.200.0030.00316.63
7.4.190.0030.00316.71
7.4.160.0060.00916.54
7.4.150.0150.00317.40
7.4.140.0110.00717.86
7.4.130.0090.00716.64
7.4.120.0100.00716.66
7.4.110.0110.00716.51
7.4.100.0110.01116.55
7.4.90.0080.01116.46
7.4.80.0090.00919.39
7.4.70.0040.01316.61
7.4.60.0100.00716.55
7.4.50.0040.00416.65
7.4.40.0060.00622.77
7.4.30.0120.00616.39
7.4.00.0100.00314.89
7.3.330.0030.00313.41
7.3.320.0000.00613.21
7.3.310.0000.00716.23
7.3.300.0000.00716.50
7.3.290.0120.00616.46
7.3.280.0130.00516.42
7.3.270.0140.00317.40
7.3.260.0120.00916.29
7.3.250.0120.00816.53
7.3.240.0070.01416.46
7.3.230.0100.00716.50
7.3.210.0070.01016.54
7.3.200.0150.00519.39
7.3.190.0100.00716.38
7.3.180.0080.00816.42
7.3.170.0180.00316.38
7.3.160.0070.01016.52
7.3.120.0030.01314.65
7.2.330.0170.00016.81
7.2.320.0110.00716.77
7.2.310.0070.01016.82
7.2.300.0150.00916.50
7.2.290.0120.00916.66
7.2.60.0100.00317.13
7.2.00.0040.00819.28
7.1.200.0030.01015.97
7.1.100.0070.00718.16
7.1.70.0030.00517.27
7.1.60.0070.01619.17
7.1.50.0140.01117.08
7.1.00.0030.04722.41
7.0.200.0050.00216.86
7.0.140.0030.07322.12
7.0.100.0030.04719.99
7.0.90.0400.06019.94
7.0.80.0330.06720.04
7.0.70.0170.08319.91
7.0.60.0200.07320.01
7.0.50.0270.07720.33
7.0.40.0030.07720.08
7.0.30.0100.07720.12
7.0.20.0030.08320.18
7.0.10.0170.07320.10
7.0.00.0070.07720.03
5.6.280.0070.07021.11
5.6.250.0030.04320.79
5.6.240.0100.06020.68
5.6.230.0170.04020.68
5.6.220.0130.06720.48
5.6.210.0070.04320.57
5.6.200.0070.05021.07
5.6.190.0070.08320.98
5.6.180.0130.06021.04
5.6.170.0030.08021.06
5.6.160.0100.08021.09
5.6.150.0070.07720.95
5.6.140.0070.08720.97
5.6.130.0070.08721.04
5.6.120.0030.08021.11
5.6.110.0100.05720.98
5.6.100.0130.07021.04
5.6.90.0070.06020.95
5.6.80.0200.06720.49
5.6.70.0200.08720.44
5.6.60.0100.08020.34
5.6.50.0170.07020.48
5.6.40.0200.06720.43
5.6.30.0100.06720.42
5.6.20.0100.04020.30
5.6.10.0170.04720.38
5.6.00.0070.04320.46
5.5.380.0130.07720.55
5.5.370.0230.05720.36
5.5.360.0070.08720.37
5.5.350.0070.08720.36
5.5.340.0030.08320.79
5.5.330.0070.08720.94
5.5.320.0070.08320.79
5.5.310.0000.07720.79
5.5.300.0170.07720.90
5.5.290.0070.06720.88
5.5.280.0100.07320.88
5.5.270.0030.05020.90
5.5.260.0030.07020.86
5.5.250.0170.07020.55
5.5.240.0130.07720.32
5.5.230.0100.08020.14
5.5.220.0070.07320.24
5.5.210.0100.08020.18
5.5.200.0170.04720.17
5.5.190.0200.07320.17
5.5.180.0070.04020.19
5.5.160.0070.07720.16
5.5.150.0100.04320.29
5.5.140.0100.05720.26
5.5.130.0030.08320.22
5.5.120.0100.06320.27
5.5.110.0100.08020.29
5.5.100.0170.07020.11
5.5.90.0100.05020.11
5.5.80.0170.07320.09
5.5.70.0100.07020.15
5.5.60.0030.06320.10
5.5.50.0070.04020.01
5.5.40.0030.08020.15
5.5.30.0130.07019.97
5.5.20.0100.08020.16
5.5.10.0100.07720.05
5.5.00.0100.06720.09
5.4.450.0100.08019.27
5.4.440.0170.07719.35
5.4.430.0030.09019.45
5.4.420.0100.06719.37
5.4.410.0170.06719.07
5.4.400.0170.07319.24
5.4.390.0030.08019.04
5.4.380.0070.07018.91
5.4.370.0170.06719.18
5.4.360.0070.07719.04
5.4.350.0100.06319.20
5.4.340.0070.06018.95
5.4.320.0000.08018.87
5.4.310.0100.06019.18
5.4.300.0030.07719.12
5.4.290.0030.04319.02
5.4.280.0070.06019.04
5.4.270.0070.05319.04
5.4.260.0100.07019.09
5.4.250.0070.08019.22
5.4.240.0000.07318.94
5.4.230.0070.08019.22
5.4.220.0030.06719.21
5.4.210.0100.04019.17
5.4.200.0130.06319.10
5.4.190.0200.06319.08
5.4.180.0100.06319.17
5.4.170.0070.07319.11
5.4.160.0070.06719.12
5.4.150.0100.07019.02
5.4.140.0170.06316.37
5.4.130.0130.06016.44
5.4.120.0100.08016.44
5.4.110.0000.08316.34
5.4.100.0030.05316.27
5.4.90.0100.07016.61
5.4.80.0130.07016.37
5.4.70.0030.07316.39
5.4.60.0130.07016.48
5.4.50.0100.07016.46
5.4.40.0100.04716.46
5.4.30.0030.04316.30
5.4.20.0030.06716.36
5.4.10.0100.07016.38
5.4.00.0170.03315.86
5.3.290.0070.08314.70
5.3.280.0000.07014.63
5.3.270.0100.07714.59
5.3.260.0030.08014.72
5.3.250.0030.07314.65
5.3.240.0100.06714.70
5.3.230.0030.05714.64
5.3.220.0070.04714.59
5.3.210.0170.05714.64
5.3.200.0030.07714.71
5.3.190.0070.06714.51
5.3.180.0070.06314.71
5.3.170.0230.05714.64
5.3.160.0070.06314.67
5.3.150.0100.06714.50
5.3.140.0100.07014.68
5.3.130.0070.08014.66
5.3.120.0070.07014.70
5.3.110.0100.07314.65
5.3.100.0000.07314.02
5.3.90.0130.06314.13
5.3.80.0000.08314.05
5.3.70.0130.06714.13
5.3.60.0030.04014.00
5.3.50.0070.07313.99
5.3.40.0070.07014.02
5.3.30.0130.06313.98
5.3.20.0030.07713.81
5.3.10.0200.04713.59
5.3.00.0070.07013.54
5.2.170.0070.05712.98
5.2.160.0030.05312.98
5.2.150.0070.06012.98
5.2.140.0100.05312.98
5.2.130.0000.04312.98
5.2.120.0070.06312.98
5.2.110.0070.06012.98
5.2.100.0000.04712.98
5.2.90.0100.06012.98
5.2.80.0100.03712.98
5.2.70.0100.06012.98
5.2.60.0030.06312.98
5.2.50.0100.05312.98
5.2.40.0000.05712.98
5.2.30.0030.03312.98
5.2.20.0170.05012.98
5.2.10.0070.05712.98
5.2.00.0030.05312.98
5.1.60.0000.03312.98
5.1.50.0070.05012.98
5.1.40.0030.03712.98
5.1.30.0030.02712.98
5.1.20.0030.05712.98
5.1.10.0000.03012.98
5.1.00.0030.03012.98
5.0.50.0000.04712.98
5.0.40.0070.03712.98
5.0.30.0000.03712.98
5.0.20.0100.04012.98
5.0.10.0070.04012.98
5.0.00.0100.06012.98
4.4.90.0030.02712.98
4.4.80.0070.02712.98
4.4.70.0030.03712.98
4.4.60.0100.02712.98
4.4.50.0030.03312.98
4.4.40.0070.04312.98
4.4.30.0030.03012.98
4.4.20.0000.02712.98
4.4.10.0030.03312.98
4.4.00.0000.05012.98
4.3.110.0000.02312.98
4.3.100.0000.03312.98
4.3.90.0070.04012.98
4.3.80.0000.05712.98
4.3.70.0000.02712.98
4.3.60.0070.01712.98
4.3.50.0000.03312.98
4.3.40.0000.02712.98
4.3.30.0000.02712.98
4.3.20.0030.03712.98
4.3.10.0030.02012.98
4.3.00.0000.03012.98

preferences:
43.29 ms | 400 KiB | 5 Q