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 ($fruits 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.60.0070.01418.55
8.3.50.0140.00521.14
8.3.40.0150.00418.63
8.3.30.0080.00818.90
8.3.20.0050.00318.58
8.3.10.0050.00319.22
8.3.00.0070.00021.76
8.2.180.0110.00716.88
8.2.170.0130.00722.96
8.2.160.0070.00720.57
8.2.150.0030.00524.18
8.2.140.0000.00924.66
8.2.130.0060.00326.16
8.2.120.0030.00619.29
8.2.110.0030.00622.25
8.2.100.0090.00317.75
8.2.90.0040.00419.22
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0040.00417.90
8.2.50.0000.00818.07
8.2.40.0000.00918.22
8.2.30.0000.00721.28
8.2.20.0000.00817.82
8.2.10.0000.00717.82
8.2.00.0000.00817.82
8.1.280.0130.01025.92
8.1.270.0050.00223.99
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00323.96
8.1.230.0000.01220.95
8.1.220.0050.00318.77
8.1.210.0040.00718.88
8.1.200.0060.00317.23
8.1.190.0030.00517.54
8.1.180.0000.00818.10
8.1.170.0000.00818.52
8.1.160.0000.00718.93
8.1.150.0000.00818.73
8.1.140.0040.00417.53
8.1.130.0070.00017.96
8.1.120.0040.00417.53
8.1.110.0060.00317.39
8.1.100.0050.00217.41
8.1.90.0000.00717.46
8.1.80.0040.00417.54
8.1.70.0050.00317.38
8.1.60.0000.00817.52
8.1.50.0000.00717.52
8.1.40.0000.00817.45
8.1.30.0060.00317.59
8.1.20.0040.00417.71
8.1.10.0050.00217.50
8.1.00.0080.00017.45
8.0.300.0090.00019.96
8.0.290.0030.00317.05
8.0.280.0000.00818.48
8.0.270.0030.00317.21
8.0.260.0030.00316.92
8.0.250.0070.00016.95
8.0.240.0060.00317.09
8.0.230.0050.00317.10
8.0.220.0070.00416.96
8.0.210.0040.00417.02
8.0.200.0080.00016.92
8.0.190.0070.00016.96
8.0.180.0070.00017.00
8.0.170.0000.00817.02
8.0.160.0030.00316.84
8.0.150.0040.00416.93
8.0.140.0050.00217.01
8.0.130.0040.00413.45
8.0.120.0040.00416.95
8.0.110.0080.00017.11
8.0.100.0030.00316.79
8.0.90.0050.00216.98
8.0.80.0060.01516.92
8.0.70.0040.00416.93
8.0.60.0000.00816.87
8.0.50.0030.00616.98
8.0.30.0080.01217.21
8.0.20.0110.00817.40
8.0.10.0040.00416.91
8.0.00.0160.00617.10
7.4.330.0020.00214.66
7.4.320.0000.00616.49
7.4.300.0030.00316.59
7.4.290.0030.00316.56
7.4.280.0000.00716.63
7.4.270.0040.00416.65
7.4.260.0000.00613.34
7.4.250.0000.01016.45
7.4.240.0050.00216.45
7.4.230.0000.00716.64
7.4.220.0120.00416.64
7.4.210.0110.00416.63
7.4.200.0030.00316.39
7.4.190.0040.00416.80
7.4.160.0120.00916.45
7.4.150.0030.01517.40
7.4.140.0080.00917.86
7.4.130.0100.00716.61
7.4.120.0060.01416.65
7.4.110.0090.00916.54
7.4.100.0120.00916.62
7.4.90.0090.00916.55
7.4.80.0120.00319.37
7.4.70.0030.01516.57
7.4.60.0030.01416.68
7.4.50.0080.00016.30
7.4.40.0040.01122.52
7.4.30.0150.00616.56
7.4.00.0070.01114.93
7.3.330.0000.00613.14
7.3.320.0050.00013.23
7.3.310.0000.00716.11
7.3.300.0000.00716.14
7.3.290.0060.00916.22
7.3.280.0050.00916.30
7.3.270.0110.00717.40
7.3.260.0150.00718.24
7.3.250.0100.00916.39
7.3.240.0130.01016.31
7.3.230.0120.00616.39
7.3.210.0090.00916.14
7.3.200.0060.01219.39
7.3.190.0060.01016.38
7.3.180.0130.00316.41
7.3.170.0120.00616.52
7.3.160.0060.01016.38
7.3.120.0040.01114.83
7.2.330.0100.01016.71
7.2.320.0060.01316.40
7.2.310.0030.01916.65
7.2.300.0170.00016.77
7.2.290.0060.01316.53
7.1.100.0060.00618.13
7.1.70.0000.01017.21
7.1.60.0130.00019.40
7.1.50.0070.01017.00
7.1.00.0030.06722.48
7.0.200.0000.00916.81
7.0.140.0030.07322.08
7.0.70.0000.03321.82
7.0.60.0000.07721.87
7.0.50.0030.03722.12
7.0.40.0000.03720.10
7.0.30.0030.04020.18
7.0.20.0030.03320.14
7.0.10.0000.05720.16
7.0.00.0030.04020.00
5.6.280.0000.07721.10
5.6.220.0000.04320.55
5.6.210.0100.02720.62
5.6.200.0000.04721.11
5.6.190.0030.04021.10
5.6.180.0000.04321.02
5.6.170.0000.04021.10
5.6.160.0030.07320.96
5.6.150.0030.05021.00
5.6.140.0030.05020.93
5.6.130.0070.08021.13
5.6.120.0070.08321.11
5.6.110.0100.07721.12
5.6.100.0000.06720.93
5.6.90.0000.07720.98
5.6.80.0030.05020.48
5.6.70.0070.06320.42
5.6.60.0030.05020.49
5.6.50.0070.05720.55
5.6.40.0000.08020.31
5.6.30.0070.08020.45
5.6.20.0070.06720.39
5.6.10.0100.07020.43
5.6.00.0130.07320.44
5.5.360.0030.04020.48
5.5.350.0000.04020.42
5.5.340.0000.04720.64
5.5.330.0000.03720.78
5.5.320.0070.03720.83
5.5.310.0000.03720.91
5.5.300.0030.04720.88
5.5.290.0070.04720.80
5.5.280.0030.04320.87
5.5.270.0070.08020.80
5.5.260.0000.09320.72
5.5.250.0000.07720.68
5.5.240.0030.07720.02
5.5.230.0000.08320.14
5.5.220.0030.05020.02
5.5.210.0100.07320.24
5.5.200.0070.08020.13
5.5.190.0030.07720.12
5.5.180.0030.08320.14
5.5.160.0100.07720.22
5.5.150.0100.07720.26
5.5.140.0070.05320.12
5.5.130.0070.08320.24
5.5.120.0130.06720.20
5.5.110.0030.07720.23
5.5.100.0070.06720.12
5.5.90.0030.08319.92
5.5.80.0030.05719.94
5.5.70.0070.07019.92
5.5.60.0030.08020.16
5.5.50.0030.07720.05
5.5.40.0000.08320.09
5.5.30.0030.05020.07
5.5.20.0070.05720.04
5.5.10.0070.07320.05
5.5.00.0000.08720.12
5.4.450.0030.04319.47
5.4.440.0100.07319.45
5.4.430.0030.07719.16
5.4.420.0100.07019.30
5.4.410.0100.07318.98
5.4.400.0070.07319.03
5.4.390.0000.05019.23
5.4.380.0070.07019.03
5.4.370.0030.07718.81
5.4.360.0000.06719.03
5.4.350.0070.04318.94
5.4.340.0070.07719.12
5.4.320.0000.08019.13
5.4.310.0100.07019.06
5.4.300.0030.07719.11
5.4.290.0030.07719.07
5.4.280.0130.04018.78
5.4.270.0170.06318.97
5.4.260.0030.08019.09
5.4.250.0030.08019.16
5.4.240.0030.07018.80
5.4.230.0000.08318.89
5.4.220.0000.08319.13
5.4.210.0100.07019.02
5.4.200.0070.07018.93
5.4.190.0030.07319.02
5.4.180.0000.08019.11
5.4.170.0130.07019.13
5.4.160.0030.07719.01
5.4.150.0070.06018.76
5.4.140.0070.06316.23
5.4.130.0070.06716.31
5.4.120.0000.04316.25
5.4.110.0030.04316.23
5.4.100.0000.04316.34
5.4.90.0030.04716.26
5.4.80.0000.05716.34
5.4.70.0100.07016.19
5.4.60.0000.07716.21
5.4.50.0030.07316.28
5.4.40.0000.05016.26
5.4.30.0030.07716.40
5.4.20.0000.05016.18
5.4.10.0030.04716.20
5.4.00.0070.04315.66
5.3.290.0030.07314.67
5.3.280.0030.07714.48
5.3.270.0000.06714.46
5.3.260.0070.08014.57
5.3.250.0030.06314.45
5.3.240.0000.05014.59
5.3.230.0000.05014.46
5.3.220.0030.06014.52
5.3.210.0070.07014.57
5.3.200.0070.03714.56
5.3.190.0030.05714.53
5.3.180.0000.08014.51
5.3.170.0070.07014.53
5.3.160.0000.07014.47
5.3.150.0070.07314.50
5.3.140.0070.06314.41
5.3.130.0030.07014.41
5.3.120.0070.04714.39
5.3.110.0070.05714.56
5.3.100.0000.08013.88
5.3.90.0000.08013.93
5.3.80.0070.07313.89
5.3.70.0070.06314.00
5.3.60.0000.07314.00
5.3.50.0030.07313.90
5.3.40.0100.06313.93
5.3.30.0000.05313.81
5.3.20.0000.07713.67
5.3.10.0030.09313.51
5.3.00.0030.07013.62
5.2.170.0000.06011.19
5.2.160.0030.04711.10
5.2.150.0030.06711.13
5.2.140.0000.05010.93
5.2.130.0030.05311.02
5.2.120.0000.06010.92
5.2.110.0070.03711.09
5.2.100.0000.03711.12
5.2.90.0030.03011.17
5.2.80.0030.02711.14
5.2.70.0000.04011.09
5.2.60.0070.02711.03
5.2.50.0000.06310.85
5.2.40.0100.05310.82
5.2.30.0030.03710.97
5.2.20.0000.06311.01
5.2.10.0000.06710.93
5.2.00.0030.06010.62
5.1.60.0070.05310.31
5.1.50.0030.05010.31
5.1.40.0030.05010.31
5.1.30.0000.06010.38
5.1.20.0070.03710.40
5.1.10.0000.03710.31
5.1.00.0070.05010.31
5.0.50.0030.03010.31
5.0.40.0030.04310.31
5.0.30.0000.06010.31
5.0.20.0000.04010.31
5.0.10.0030.03710.31
5.0.00.0070.05710.31
4.4.90.0000.01710.31
4.4.80.0000.02010.31
4.4.70.0000.03710.31
4.4.60.0000.03010.31
4.4.50.0000.02710.31
4.4.40.0000.05310.31
4.4.30.0070.02710.31
4.4.20.0000.03010.31
4.4.10.0070.03010.31
4.4.00.0030.05010.31
4.3.110.0000.03710.31
4.3.100.0000.03010.31
4.3.90.0000.02010.31
4.3.80.0000.05710.31
4.3.70.0000.02710.31
4.3.60.0000.03710.31
4.3.50.0000.03310.31
4.3.40.0000.05310.31
4.3.30.0000.03310.31
4.3.20.0000.02710.31
4.3.10.0000.03010.31
4.3.00.0000.03310.31

preferences:
41.27 ms | 401 KiB | 5 Q