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); $p=array('md5'=>'H32','sha1'=>'H40'); if(strlen($passwd)>64) $passwd=pack($p[$algo],$algo($passwd)); if(strlen($passwd)<64) $passwd=str_pad($passwd,64,chr(0)); $ipad=substr($passwd,0,64) ^ str_repeat(chr(0x36),64); $opad=substr($passwd,0,64) ^ str_repeat(chr(0x5C),64); return($algo($opad.pack($p[$algo],$algo($ipad.$data)))); } # 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> <BR> <BR> <CENTER><h1>DEMO</h1> <TABLE border=1> <form action="{$submit_url}" method=POST> <input type=hidden name=PAGE value="paylogin"> <input type=hidden name=ENCODED value="{$ENCODED}"> <input type=hidden name=CHECKSUM value="{$CHECKSUM}"> <input type=hidden name=URL_OK value="SET_URL_OK_IF_NEEDED"> <input type=hidden name=URL_CANCEL value="SET_URL_CANCEL_IF_NEEDED"> <TR> <TD>ÌÈÍ: {$min}</TD> </TR> <TR> <TD>Ôàêòóðà íîìåð: {$invoice}</TD> </TR> <TR> <TD>Îïèñàíèå: {$descr}</TD> </TR> <TR> <TD> <xmp> Ïðîäóêòè êîë. åä.öåíà öåíà ------------------------------------------------ ïðîäóêò1 3 2.50 7.50 ïðîäóêò2 1 3.50 3.50 ïðîäóêò3 2 4.00 8.00 ------------------------------------------------ îáùî 19.00 ÄÄÑ 3.80 Âñè÷êî {$sum} </xmp> </TD> </TR> <TR> <TD>Ñóìà: {$sum}</TD> </TR> </table> <table width=100%> <TR align=center> <TD><INPUT type=submit></TD> </TR> </TABLE> </form> </BODY> </HTML> 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.0170.00418.55
8.3.50.0100.01021.14
8.3.40.0040.01118.66
8.3.30.0070.00720.38
8.3.20.0050.00321.97
8.3.10.0080.00021.95
8.3.00.0040.00422.43
8.2.180.0160.00316.35
8.2.170.0080.00822.96
8.2.160.0130.00318.91
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00420.77
8.2.110.0030.00619.30
8.2.100.0090.00317.78
8.2.90.0040.00419.17
8.2.80.0040.00419.47
8.2.70.0030.00617.63
8.2.60.0040.00418.04
8.2.50.0000.00918.07
8.2.40.0000.00818.21
8.2.30.0040.00419.45
8.2.20.0040.00417.65
8.2.10.0040.00417.84
8.2.00.0000.00817.82
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.59
8.1.230.0030.00920.97
8.1.220.0050.00318.77
8.1.210.0080.00019.18
8.1.200.0060.00317.22
8.1.190.0050.00317.30
8.1.180.0000.00818.10
8.1.170.0030.00618.64
8.1.160.0000.00718.89
8.1.150.0000.00818.61
8.1.140.0030.00517.29
8.1.130.0040.00417.76
8.1.120.0000.00817.34
8.1.110.0000.00817.45
8.1.100.0040.00417.40
8.1.90.0000.00717.33
8.1.80.0040.00417.31
8.1.70.0050.00317.43
8.1.60.0080.00017.59
8.1.50.0040.00417.56
8.1.40.0120.00017.51
8.1.30.0040.00417.66
8.1.20.0090.00017.57
8.1.10.0060.00317.56
8.1.00.0080.00017.46
8.0.300.0000.00719.95
8.0.290.0000.00717.18
8.0.280.0040.00418.43
8.0.270.0070.00017.29
8.0.260.0000.00616.92
8.0.250.0050.00317.11
8.0.240.0040.00416.94
8.0.230.0030.00517.10
8.0.220.0000.00616.89
8.0.210.0050.00316.98
8.0.200.0000.00617.01
8.0.190.0040.00416.94
8.0.180.0050.00317.02
8.0.170.0000.00816.97
8.0.160.0040.00416.96
8.0.150.0000.00716.95
8.0.140.0000.00816.95
8.0.130.0030.00313.48
8.0.120.0050.00216.95
8.0.110.0000.00816.91
8.0.100.0000.00716.86
8.0.90.0040.00416.87
8.0.80.0130.00316.98
8.0.70.0000.00817.05
8.0.60.0040.00416.97
8.0.50.0040.00416.83
8.0.30.0090.01017.20
8.0.20.0160.00317.40
8.0.10.0000.00717.09
8.0.00.0080.01216.85
7.4.330.0040.00015.02
7.4.320.0030.00316.45
7.4.300.0000.00716.62
7.4.290.0000.00716.62
7.4.280.0000.00716.52
7.4.270.0070.00016.45
7.4.260.0060.00013.34
7.4.250.0040.00416.48
7.4.240.0030.00416.54
7.4.230.0070.00016.65
7.4.220.0110.00816.56
7.4.210.0090.00616.62
7.4.200.0070.00016.46
7.4.190.0070.00016.77
7.4.160.0100.00616.83
7.4.150.0140.00317.40
7.4.140.0130.00617.86
7.4.130.0090.00916.51
7.4.120.0080.00916.62
7.4.110.0070.01116.61
7.4.100.0150.00916.52
7.4.90.0070.01016.58
7.4.80.0100.00719.39
7.4.70.0000.01716.60
7.4.60.0100.00616.53
7.4.50.0040.00416.74
7.4.40.0130.00322.77
7.4.30.0070.01016.35
7.4.00.0060.01014.88
7.3.330.0000.00613.31
7.3.320.0060.00013.21
7.3.310.0040.00416.30
7.3.300.0070.00016.30
7.3.290.0070.00716.41
7.3.280.0090.00716.42
7.3.270.0130.00317.40
7.3.260.0170.00016.66
7.3.250.0100.00916.56
7.3.240.0140.00716.64
7.3.230.0160.00616.58
7.3.210.0100.01016.49
7.3.200.0040.02019.39
7.3.190.0130.00616.54
7.3.180.0100.00716.50
7.3.170.0080.00816.42
7.3.160.0150.00416.46
7.3.120.0030.01414.81
7.2.330.0070.01116.71
7.2.320.0120.01216.53
7.2.310.0060.01116.50
7.2.300.0030.01616.53
7.2.290.0150.00816.57
7.2.60.0070.01016.78
7.2.00.0060.00619.53
7.1.200.0070.00315.79
7.1.100.0040.00818.13
7.1.70.0060.00317.34
7.1.60.0150.00319.17
7.1.50.0090.01616.70
7.1.00.0030.03722.44
7.0.200.0030.00316.99
7.0.140.0030.07322.00
7.0.80.0130.05019.95
7.0.70.0400.07720.01
7.0.60.0470.07319.80
7.0.50.0400.08020.33
7.0.40.0070.04320.10
7.0.30.0100.08020.04
7.0.20.0070.06020.08
7.0.10.0130.07720.10
7.0.00.0030.08320.14
5.6.280.0070.07021.00
5.6.230.0130.07720.55
5.6.220.0030.09020.57
5.6.210.0000.07720.69
5.6.200.0030.05720.95
5.6.190.0030.09021.13
5.6.180.0100.08021.05
5.6.170.0100.06721.08
5.6.160.0070.07021.19
5.6.150.0100.07720.98
5.6.140.0100.05321.12
5.6.130.0130.07321.15
5.6.120.0030.07720.95
5.6.110.0000.06720.94
5.6.100.0100.05321.05
5.6.90.0070.05020.93
5.6.80.0070.04720.51
5.6.70.0130.07720.48
5.6.60.0100.08020.52
5.6.50.0070.07720.50
5.6.40.0100.04320.48
5.6.30.0170.06320.39
5.6.20.0130.06320.45
5.6.10.0130.07320.46
5.6.00.0100.07720.29
5.5.370.0030.08320.38
5.5.360.0030.08020.35
5.5.350.0130.07720.35
5.5.340.0100.08020.89
5.5.330.0030.08320.81
5.5.320.0100.07720.94
5.5.310.0070.07020.92
5.5.300.0030.07320.93
5.5.290.0070.08020.87
5.5.280.0130.07720.79
5.5.270.0000.09020.87
5.5.260.0130.07720.86
5.5.250.0100.08020.71
5.5.240.0200.05720.24
5.5.230.0100.04720.13
5.5.220.0070.07320.03
5.5.210.0030.08720.22
5.5.200.0130.04020.14
5.5.190.0070.06720.27
5.5.180.0030.06020.28
5.5.160.0200.06020.25
5.5.150.0070.06020.26
5.5.140.0170.07320.11
5.5.130.0130.04320.16
5.5.120.0100.03320.11
5.5.110.0030.04720.25
5.5.100.0200.02720.15
5.5.90.0070.04020.16
5.5.80.0130.03020.11
5.5.70.0070.04720.18
5.5.60.0070.03720.10
5.5.50.0030.04020.04
5.5.40.0100.03319.98
5.5.30.0000.06720.01
5.5.20.0000.04320.16
5.5.10.0000.04019.98
5.5.00.0100.03320.13
5.4.450.0100.04019.55
5.4.440.0100.08019.23
5.4.430.0070.04019.45
5.4.420.0030.08319.44
5.4.410.0030.05719.29
5.4.400.0030.08319.14
5.4.390.0030.05319.04
5.4.380.0030.04719.13
5.4.370.0030.06718.95
5.4.360.0130.06319.10
5.4.350.0070.07719.23
5.4.340.0070.07319.13
5.4.320.0100.04019.18
5.4.310.0100.07319.12
5.4.300.0030.05018.86
5.4.290.0030.04319.23
5.4.280.0030.04719.16
5.4.270.0070.07019.20
5.4.260.0030.03719.24
5.4.250.0000.04319.14
5.4.240.0000.04018.89
5.4.230.0030.03718.87
5.4.220.0030.04018.87
5.4.210.0000.04018.94
5.4.200.0000.04019.20
5.4.190.0030.04019.03
5.4.180.0030.04019.12
5.4.170.0030.04019.11
5.4.160.0070.03719.21
5.4.150.0000.04318.83
5.4.140.0000.04016.41
5.4.130.0030.03716.34
5.4.120.0030.03716.42
5.4.110.0000.04016.51
5.4.100.0070.03316.49
5.4.90.0100.03016.47
5.4.80.0000.04016.38
5.4.70.0030.03716.26
5.4.60.0030.04016.41
5.4.50.0070.03316.36
5.4.40.0000.03716.49
5.4.30.0100.03016.41
5.4.20.0030.03316.50
5.4.10.0000.04016.46
5.4.00.0070.04315.78
5.3.290.0070.07314.77
5.3.280.0030.04014.75
5.3.270.0030.03714.63
5.3.260.0100.03314.54
5.3.250.0030.03714.54
5.3.240.0070.03314.70
5.3.230.0030.05714.60
5.3.220.0100.03314.52
5.3.210.0030.03714.69
5.3.200.0000.04314.56
5.3.190.0170.04714.67
5.3.180.0030.03714.50
5.3.170.0030.03714.70
5.3.160.0000.04714.53
5.3.150.0070.03014.63
5.3.140.0000.04014.62
5.3.130.0030.04014.49
5.3.120.0030.04714.61
5.3.110.0030.04014.57
5.3.100.0100.04314.10
5.3.90.0100.03014.12
5.3.80.0070.03014.08
5.3.70.0000.05313.95
5.3.60.0070.03314.05
5.3.50.0000.04014.02
5.3.40.0100.03313.96
5.3.30.0100.02713.85
5.3.20.0000.04713.79
5.3.10.0000.06013.76
5.3.00.0030.04713.71
5.2.170.0000.03311.96
5.2.160.0000.03311.96
5.2.150.0000.03011.96
5.2.140.0000.03311.96
5.2.130.0030.03011.96
5.2.120.0000.03011.96
5.2.110.0070.02711.96
5.2.100.0030.05711.96
5.2.90.0100.05011.96
5.2.80.0070.04711.96
5.2.70.0070.06011.96
5.2.60.0070.05311.96
5.2.50.0000.06711.96
5.2.40.0030.03311.96
5.2.30.0030.06011.96
5.2.20.0030.06311.96
5.2.10.0070.06011.96
5.2.00.0070.05711.96
5.1.60.0030.05311.96
5.1.50.0030.04311.96
5.1.40.0000.04311.96
5.1.30.0100.05011.96
5.1.20.0070.03011.96
5.1.10.0030.03311.96
5.1.00.0030.04011.96
5.0.50.0000.04711.96
5.0.40.0000.03711.96
5.0.30.0070.05711.96
5.0.20.0000.03011.96
5.0.10.0070.04011.96
5.0.00.0030.04311.96
4.4.90.0000.02711.96
4.4.80.0000.04011.96
4.4.70.0030.03311.96
4.4.60.0030.01711.96
4.4.50.0030.01711.96
4.4.40.0070.05011.96
4.4.30.0030.03711.96
4.4.20.0000.04011.96
4.4.10.0030.03711.96
4.4.00.0000.05711.96
4.3.110.0000.03711.96
4.3.100.0030.03011.96
4.3.90.0030.02711.96
4.3.80.0000.03311.96
4.3.70.0000.01711.96
4.3.60.0070.01311.96
4.3.50.0000.01711.96
4.3.40.0030.03311.96
4.3.30.0070.03011.96
4.3.20.0000.03711.96
4.3.10.0000.03711.96
4.3.00.0000.03311.96

preferences:
52.69 ms | 401 KiB | 5 Q