3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret = 'MySecretFromSiruMobile'; $fields = [ 'variant' => 'variant1', 'merchantId' => '123123', 'purchaseCountry' => 'FI', 'basePrice' => '12.34', 'taxClass' => 3, 'serviceGroup' => 3, 'customerFirstname' => '', 'customerLastname' => null, 'customerNumber' => '050 123 4567', ]; $fields = array_filter($fields); // Drop empty fields echo 'UNSORTED'; $signature = hash_hmac("sha512", implode(';', $fields), $secret); ksort($fields); // Sort by field name foreach ($fields as $key => $val) { echo "$key = $val\n"; } echo 'SORTED'; $signature = hash_hmac("sha512", implode(';', $fields), $secret); echo $signature; ?>

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.40.0040.01118.70
8.3.30.0040.01118.59
8.3.20.0080.00018.70
8.3.10.0040.00421.15
8.3.00.0040.00421.73
8.2.170.0110.00422.96
8.2.160.0060.00920.43
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.04
8.2.110.0050.00520.35
8.2.100.0040.00817.91
8.2.90.0000.00819.09
8.2.80.0030.00617.97
8.2.70.0060.00317.50
8.2.60.0080.00017.80
8.2.50.0000.00818.07
8.2.40.0080.00018.22
8.2.30.0040.00419.41
8.2.20.0040.00417.57
8.2.10.0000.00817.88
8.2.00.0120.00017.62
8.1.270.0080.00823.99
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0070.00322.53
8.1.230.0070.00320.96
8.1.220.0060.00318.77
8.1.210.0100.00018.97
8.1.200.0060.00317.23
8.1.190.0080.00017.41
8.1.180.0050.00318.10
8.1.170.0070.00018.65
8.1.160.0070.00018.90
8.1.150.0040.00418.55
8.1.140.0030.00617.49
8.1.130.0000.00817.82
8.1.120.0000.00717.53
8.1.110.0000.00717.48
8.1.100.0000.00717.47
8.1.90.0040.00417.52
8.1.80.0000.00717.39
8.1.70.0030.00317.47
8.1.60.0040.00417.62
8.1.50.0000.00717.54
8.1.40.0040.00417.43
8.1.30.0030.00517.68
8.1.20.0000.00817.62
8.1.10.0030.00517.55
8.1.00.0000.00817.46
8.0.300.0000.00719.86
8.0.290.0080.00017.16
8.0.280.0000.00718.50
8.0.270.0030.00317.21
8.0.260.0000.00716.79
8.0.250.0040.00416.86
8.0.240.0040.00417.01
8.0.230.0070.00016.88
8.0.220.0000.00716.97
8.0.210.0030.00316.92
8.0.200.0000.00716.90
8.0.190.0070.00016.95
8.0.180.0000.00716.95
8.0.170.0000.00816.96
8.0.160.0030.00516.78
8.0.150.0050.00316.89
8.0.140.0020.00516.88
8.0.130.0000.00613.32
8.0.120.0080.00016.91
8.0.110.0060.00316.80
8.0.100.0080.00016.75
8.0.90.0040.00416.91
8.0.80.0070.01416.99
8.0.70.0000.00716.74
8.0.60.0000.00716.78
8.0.50.0040.00416.77
8.0.30.0100.00917.27
8.0.20.0080.01117.40
8.0.10.0040.00417.09
8.0.00.0120.01116.75
7.4.330.0050.00016.73
7.4.320.0000.00716.63
7.4.300.0030.00316.54
7.4.290.0030.00316.63
7.4.280.0000.00816.58
7.4.270.0030.00316.63
7.4.260.0050.00013.21
7.4.250.0040.00416.41
7.4.240.0030.00316.57
7.4.230.0070.00016.69
7.4.220.0110.00716.50
7.4.210.0070.00816.55
7.4.200.0000.00716.52
7.4.190.0000.00716.45
7.4.160.0100.00716.38
7.4.150.0090.01317.40
7.4.140.0110.00817.86
7.4.130.0120.00716.53
7.4.120.0100.00816.57
7.4.110.0180.00016.63
7.4.100.0100.01016.41
7.4.90.0060.01216.49
7.4.80.0000.01619.39
7.4.70.0100.01416.36
7.4.60.0120.00616.72
7.4.50.0080.00016.53
7.4.40.0120.00622.77
7.4.30.0060.01116.48
7.4.00.0170.00015.22
7.3.330.0030.00313.19
7.3.320.0000.00613.20
7.3.310.0030.00316.48
7.3.300.0000.00716.38
7.3.290.0030.01016.46
7.3.280.0130.00416.36
7.3.270.0110.00617.40
7.3.260.0120.01118.24
7.3.250.0090.00916.56
7.3.240.0090.00916.59
7.3.230.0080.00816.55
7.3.210.0060.01016.36
7.3.200.0060.01019.39
7.3.190.0170.00016.24
7.3.180.0160.00016.45
7.3.170.0070.01016.48
7.3.160.0090.00616.62
7.3.120.0000.01114.95
7.2.330.0120.00616.50
7.2.320.0110.00616.57
7.2.310.0050.01716.62
7.2.300.0120.01216.67
7.2.290.0040.01516.50
7.2.00.0090.00619.26
7.1.100.0040.00717.88
7.1.70.0030.00516.96
7.1.60.0120.01219.40
7.1.50.0000.01417.09
7.1.00.0000.03722.51
7.0.200.0200.00716.34
7.0.140.0100.06721.95
7.0.70.4730.04319.92
7.0.60.3400.04019.88
7.0.50.3930.04020.34
7.0.40.2870.03720.07
7.0.30.3430.03320.04
7.0.20.4330.03720.07
7.0.10.4100.04020.12
7.0.00.4230.04720.03
5.6.280.0070.07020.81
5.6.210.3900.04020.63
5.6.200.3200.04021.03
5.6.190.3000.02720.93
5.6.180.3400.03021.13
5.6.170.3970.04321.05
5.6.160.4200.04021.04
5.6.150.3800.04721.17
5.6.140.3770.04721.02
5.6.130.4230.04321.04
5.6.120.3730.05320.95
5.6.110.3700.03721.02
5.6.100.4230.04020.94
5.6.90.4170.04021.01
5.6.80.4630.04020.46
5.6.70.3570.04020.48
5.6.60.3730.03720.41
5.6.50.0300.06320.52
5.6.40.1330.04720.40
5.6.30.3370.04020.37
5.6.20.3300.03020.52
5.6.10.3570.03720.43
5.6.00.2970.03720.47
5.5.350.2970.03320.40
5.5.340.2930.05020.78
5.5.330.2600.03020.83
5.5.320.3170.04320.64
5.5.310.3770.05020.91
5.5.300.3930.04320.92
5.5.290.4270.04020.64
5.5.280.3700.04020.80
5.5.270.2870.03320.88
5.5.260.4270.04720.76
5.5.250.4370.04320.67
5.5.240.3800.03320.02
5.5.230.3330.04720.13
5.5.220.3930.04020.21
5.5.210.3700.04020.27
5.5.200.0070.07720.27
5.5.190.3670.03320.12
5.5.180.3270.04320.26
5.5.160.3270.04020.11
5.5.150.3030.03320.09
5.5.140.3130.02720.14
5.5.130.3800.03320.23
5.5.120.3530.03319.97
5.5.110.4200.03320.10
5.5.100.0070.04719.98
5.5.90.2300.05320.15
5.5.80.3870.04720.04
5.5.70.3730.03720.09
5.5.60.4370.04020.00
5.5.50.3200.02720.00
5.5.40.4170.03720.15
5.5.30.3800.03720.07
5.5.20.4230.02720.15
5.5.10.3870.04719.98
5.5.00.4330.03720.10
5.4.450.4200.03719.27
5.4.440.4070.04719.38
5.4.430.4070.03719.43
5.4.420.3570.04319.37
5.4.410.4230.03719.27
5.4.400.3600.03718.96
5.4.390.3500.03719.03
5.4.380.3870.04319.03
5.4.370.3570.03319.10
5.4.360.0030.04019.14
5.4.350.3170.02718.90
5.4.340.3730.04318.94
5.4.320.3000.03719.23
5.4.310.3230.02318.95
5.4.300.3830.04019.05
5.4.290.3530.04319.07
5.4.280.3800.03318.81
5.4.270.3830.03718.99
5.4.260.0030.05319.24
5.4.250.0170.06319.02
5.4.240.4000.03319.05
5.4.230.3170.04018.89
5.4.220.3970.03718.78
5.4.210.3700.04019.04
5.4.200.3730.04019.06
5.4.190.3970.03719.06
5.4.180.4170.02319.05
5.4.170.4130.04318.80
5.4.160.4170.03719.12
5.4.150.3900.04019.00
5.4.140.4070.03316.02
5.4.130.3870.03316.28
5.4.120.3530.02016.08
5.4.110.3400.03016.46
5.4.100.4070.03316.31
5.4.90.4000.03316.43
5.4.80.1930.03316.41
5.4.70.2070.04016.24
5.4.60.2270.04016.29
5.4.50.3300.03016.33
5.4.40.3700.04316.46
5.4.30.2900.04716.35
5.4.20.1970.03316.37
5.4.10.2430.03016.37
5.4.00.2430.03015.78
5.3.290.3170.03014.49
5.3.280.4000.03314.55
5.3.270.4270.04014.60
5.3.260.4130.03714.58
5.3.250.3530.03714.43
5.3.240.4030.03314.55
5.3.230.3600.04014.46
5.3.220.4130.03714.39
5.3.210.4030.03314.56
5.3.200.3500.03314.53
5.3.190.4070.04014.39
5.3.180.3230.03314.43
5.3.170.3070.03714.40
5.3.160.3230.02014.56
5.3.150.2900.03314.50
5.3.140.3070.03014.50
5.3.130.2300.04014.56
5.3.120.2200.03714.40
5.3.110.3330.04314.37
5.3.100.3100.03014.04
5.3.90.3170.03014.01
5.3.80.2970.02713.97
5.3.70.3130.03013.79
5.3.60.2470.02013.98
5.3.50.3430.03013.90
5.3.40.3530.03313.90
5.3.30.3300.02313.77
5.3.20.3830.03313.45
5.3.10.3900.03713.61
5.3.00.3670.03013.41
5.2.170.2470.03311.22
5.2.160.2500.03011.16
5.2.150.2000.03710.95
5.2.140.3370.03310.96
5.2.130.3200.02311.14
5.2.120.3200.03310.96
5.2.110.3270.03011.09
5.2.100.2730.02711.09
5.2.90.2930.03310.95
5.2.80.3000.02710.93
5.2.70.3730.03010.93
5.2.60.3630.03311.03
5.2.50.3400.03010.93
5.2.40.2700.02711.00
5.2.30.2600.03010.82
5.2.20.2000.03011.00
5.2.10.2700.02310.78
5.2.00.2970.02310.77
5.1.60.3000.02310.07
5.1.50.2930.0239.99
5.1.40.2970.0239.97
5.1.30.2730.02310.34
5.1.20.3000.02010.27
5.1.10.2870.03310.05
5.1.00.2770.02710.11
5.0.50.1600.0208.38
5.0.40.1500.0208.25
5.0.30.1600.0308.27
5.0.20.1770.0208.28
5.0.10.1500.0238.16
5.0.00.1630.0308.04
4.4.90.1170.0135.87
4.4.80.1630.0175.87
4.4.70.1070.0175.87
4.4.60.1130.0135.87
4.4.50.1370.0175.87
4.4.40.1630.0305.87
4.4.30.1670.0175.87
4.4.20.1700.0135.88
4.4.10.1600.0175.87
4.4.00.1400.0275.87
4.3.110.1430.0135.87
4.3.100.1600.0135.87
4.3.90.1000.0175.87
4.3.80.1830.0235.87
4.3.70.1630.0175.87
4.3.60.1500.0175.87
4.3.50.1730.0175.87
4.3.40.1730.0205.87
4.3.30.0900.0175.87
4.3.20.0930.0205.87
4.3.10.1000.0205.87
4.3.00.0900.0235.87

preferences:
38.81 ms | 400 KiB | 5 Q