3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'Message'; $secret = 'secret'; $hash1 = hash_hmac('sha256', $message, $secret, true); $encoded1 = base64_encode($hash2); $hash2 = hash_hmac('sha256', $message, $secret, true); $encoded2 = base64_encode($hash2); var_dump(hash_equals($hash1, $hash2));

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.01016.63
8.3.50.0140.00317.91
8.3.40.0120.00318.79
8.3.30.0110.00318.92
8.3.20.0040.00420.16
8.3.10.0060.00321.77
8.3.00.0050.00320.82
8.2.180.0070.01416.50
8.2.170.0110.00322.96
8.2.160.0100.00322.20
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0110.00017.54
8.2.110.0050.00522.01
8.2.100.0000.01218.03
8.2.90.0080.00019.05
8.2.80.0030.00517.97
8.2.70.0100.00017.38
8.2.60.0000.00717.93
8.2.50.0050.00318.07
8.2.40.0000.00819.75
8.2.30.0080.00018.05
8.2.20.0070.00017.68
8.2.10.0000.00717.95
8.2.00.0000.00917.61
8.1.280.0100.00625.92
8.1.270.0080.00020.71
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.67
8.1.230.0040.00817.82
8.1.220.0030.00517.78
8.1.210.0060.00318.77
8.1.200.0070.00317.23
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0030.00518.57
8.1.160.0070.00021.94
8.1.150.0070.00318.75
8.1.140.0030.00519.04
8.1.130.0000.00817.80
8.1.120.0100.00017.29
8.1.110.0050.00317.35
8.1.100.0000.00717.41
8.1.90.0070.00017.27
8.1.80.0040.00417.35
8.1.70.0030.00317.41
8.1.60.0000.00917.52
8.1.50.0040.00417.33
8.1.40.0040.00417.36
8.1.30.0040.00417.54
8.1.20.0030.00517.47
8.1.10.0040.00417.30
8.1.00.0000.00717.32
8.0.300.0040.00418.77
8.0.290.0030.00516.75
8.0.280.0040.00418.33
8.0.270.0030.00317.18
8.0.260.0040.00417.11
8.0.250.0040.00416.84
8.0.240.0030.00316.95
8.0.230.0040.00416.94
8.0.220.0070.00016.92
8.0.210.0040.00416.88
8.0.200.0050.00317.00
8.0.190.0030.00516.98
8.0.180.0040.00416.83
8.0.170.0000.00816.82
8.0.160.0000.00716.94
8.0.150.0080.00016.86
8.0.140.0000.00716.91
8.0.130.0000.00613.33
8.0.120.0000.00816.73
8.0.110.0050.00316.79
8.0.100.0070.00016.76
8.0.90.0070.00016.90
8.0.80.0130.00616.87
8.0.70.0040.00416.73
8.0.60.0040.00416.75
8.0.50.0040.00416.91
8.0.30.0080.01817.03
8.0.20.0120.00617.40
8.0.10.0030.00316.86
8.0.00.0160.00816.77
7.4.330.0000.00615.03
7.4.320.0000.00616.33
7.4.300.0060.00016.44
7.4.290.0030.00316.45
7.4.280.0040.00416.56
7.4.270.0000.00716.50
7.4.260.0070.00016.33
7.4.250.0090.00016.37
7.4.240.0070.00016.49
7.4.230.0000.00716.34
7.4.220.0110.00816.48
7.4.210.0080.00616.40
7.4.200.0000.00716.26
7.4.160.0130.00916.34
7.4.150.0120.00617.40
7.4.140.0090.00917.86
7.4.130.0100.00716.44
7.4.120.0080.00816.47
7.4.110.0070.01016.27
7.4.100.0110.00716.51
7.4.90.0180.00016.41
7.4.80.0130.01019.39
7.4.70.0150.00516.51
7.4.60.0030.01316.53
7.4.50.0000.00816.37
7.4.40.0100.00716.19
7.4.30.0120.00616.45
7.4.00.0050.01314.97
7.3.330.0060.00013.02
7.3.320.0000.00513.00
7.3.310.0030.00316.13
7.3.300.0000.00616.10
7.3.290.0030.00316.20
7.3.280.0090.00716.18
7.3.270.0110.01117.40
7.3.260.0070.01016.08
7.3.250.0070.01016.32
7.3.240.0070.01016.42
7.3.230.0090.01316.42
7.3.210.0070.01116.58
7.3.200.0090.01219.39
7.3.190.0130.00316.29
7.3.180.0060.01016.22
7.3.170.0100.01016.27
7.3.160.0060.01016.22
7.3.120.0110.00714.97
7.3.110.0060.01214.90
7.3.100.0050.00514.56
7.3.90.0060.00914.90
7.3.80.0000.01314.62
7.3.70.0030.00714.74
7.3.60.0100.00314.87
7.3.50.0070.00714.81
7.3.40.0070.00714.73
7.3.30.0070.01014.85
7.3.20.0060.00316.58
7.3.10.0070.00716.54
7.3.00.0040.01116.58
7.2.330.0090.01216.39
7.2.320.0070.01016.54
7.2.310.0100.00716.60
7.2.300.0130.01016.26
7.2.290.0100.01316.35
7.2.250.0110.00714.82
7.2.240.0110.00714.83
7.2.230.0040.01114.87
7.2.220.0040.01815.11
7.2.210.0140.00014.90
7.2.200.0040.01214.95
7.2.190.0070.00714.91
7.2.180.0040.00814.96
7.2.170.0070.01014.83
7.2.80.0090.00316.35
7.2.60.0040.01216.79
7.2.00.0090.00919.41
7.1.330.0030.01215.79
7.1.320.0030.00915.58
7.1.310.0050.00515.75
7.1.300.0070.00715.76
7.1.290.0040.01115.38
7.1.280.0070.01015.69
7.1.270.0070.00315.88
7.1.260.0070.00715.87
7.1.200.0030.01015.64
7.1.100.0030.01317.95
7.1.70.0040.00416.97
7.1.60.0170.00719.46
7.1.50.0160.00334.70
7.1.00.0030.07722.54
7.0.200.0190.00914.99
7.0.140.0070.04321.95
7.0.60.0070.03719.93
7.0.50.0030.08317.84
7.0.40.0030.04319.98
7.0.30.0270.07320.00
7.0.20.0270.03320.33
7.0.10.0130.08020.00
7.0.00.0030.08720.00
5.6.280.0100.06721.03
5.6.210.0070.04020.45
5.6.200.0100.08018.15
5.6.190.0000.08720.35
5.6.180.0300.05020.61
5.6.170.0330.04720.51
5.6.160.0200.05720.51
5.6.150.0070.06718.18
5.6.140.0070.08318.11
5.6.130.0000.04718.13
5.6.120.0130.06320.89
5.6.110.0030.04321.08
5.6.100.0100.07720.97
5.6.90.0070.06721.09
5.6.80.0130.05720.37
5.5.350.0170.04720.40
5.5.340.0030.08718.02
5.5.330.0000.04320.12
5.5.320.0030.06020.12
5.5.310.0200.04020.17
5.5.300.0100.07017.95
5.5.290.0070.03717.96
5.5.280.0030.08320.68
5.5.270.0070.04720.77
5.5.260.0100.07320.78
5.5.250.0070.05720.76
5.5.240.0070.07020.36
5.4.450.0770.05319.53
5.4.440.0130.06719.27
5.4.430.0200.05319.58
5.4.420.0230.05319.63
5.4.410.0330.04719.41
5.4.400.0130.05019.16
5.4.390.0930.07018.52
5.4.380.0930.06018.49
5.4.370.1070.06018.79
5.4.360.0900.06018.59
5.4.350.1300.06718.74
5.4.340.3730.06318.49
5.4.320.0870.07018.58
5.4.310.1030.06018.70
5.4.300.1000.07318.50
5.4.290.1070.07318.72
5.4.280.0830.06018.61
5.4.270.1100.06018.71
5.4.260.1030.07018.73
5.4.250.1070.07718.64
5.4.240.0970.07318.67
5.4.230.0800.08318.67
5.4.220.0630.08018.48
5.4.210.1000.05718.72
5.4.200.0900.05716.50
5.4.190.1030.05718.49
5.4.180.1170.05718.60
5.4.170.1170.06318.56
5.4.160.0930.07718.63
5.4.150.0100.07318.49
5.4.140.0400.06716.36
5.4.130.1000.06316.25
5.4.120.0870.07316.35
5.4.110.1200.05316.32
5.4.100.1030.06716.20
5.4.90.1100.07716.21
5.4.80.1270.06716.14
5.4.70.1170.05316.09
5.4.60.1000.07016.18
5.4.50.1030.04716.14
5.4.40.1100.05716.17
5.4.30.0770.07316.18
5.4.20.0930.06016.22
5.4.10.0800.05016.11
5.4.00.0830.04715.76
5.3.290.0900.06714.66
5.3.280.0800.05714.69
5.3.270.0770.08314.58
5.3.260.1030.06314.63
5.3.250.0970.07014.59
5.3.240.0900.06314.66
5.3.230.0930.06014.67
5.3.220.1030.07714.59
5.3.210.0830.07314.67
5.3.200.0900.06714.61
5.3.190.0970.05014.66
5.3.180.0830.06314.45
5.3.170.1070.04014.66
5.3.160.0830.06714.57
5.3.150.0800.07014.65
5.3.140.0900.06014.45
5.3.130.0800.07014.46
5.3.120.1070.05314.47
5.3.110.0870.06014.55
5.3.100.0700.05714.07
5.3.90.0970.06314.12
5.3.80.0930.06014.10
5.3.70.0900.04713.96
5.3.60.0900.06013.92
5.3.50.0770.07013.88
5.3.40.0970.06713.93
5.3.30.0970.06014.00
5.3.20.1030.06013.60
5.3.10.0700.06013.77
5.3.00.0700.05013.63
5.2.170.0600.04311.17
5.2.160.0670.03711.11
5.2.150.0800.06011.29
5.2.140.0730.04711.05
5.2.130.0800.03711.09
5.2.120.0830.05711.02
5.2.110.0870.05011.08
5.2.100.0870.02711.16
5.2.90.0770.06011.09
5.2.80.0700.04311.02
5.2.70.0670.07011.09
5.2.60.0870.04311.20
5.2.50.0070.04311.06
5.2.40.0070.04010.95
5.2.30.0570.05010.95
5.2.20.0700.03310.89
5.2.10.0570.03710.85
5.2.00.0430.05310.69
5.1.60.0470.0439.99
5.1.50.0500.0379.97
5.1.40.0530.0479.93
5.1.30.0700.04710.42
5.1.20.0430.04010.42
5.1.10.0370.04010.05
5.1.00.0600.04010.16
5.0.50.0300.0308.66
5.0.40.0330.0338.38
5.0.30.0300.0578.24
5.0.20.0370.0278.26
5.0.10.0430.0378.34
5.0.00.0400.0538.34
4.4.90.0500.0135.94
4.4.80.0330.0205.91
4.4.70.0300.0175.91
4.4.60.0370.0205.91
4.4.50.0330.0175.93
4.4.40.0400.0275.91
4.4.30.0300.0205.91
4.4.20.0230.0235.95
4.4.10.0230.0275.93
4.4.00.0330.0375.91
4.3.110.0300.0275.91
4.3.100.0300.0175.91
4.3.90.0230.0175.91
4.3.80.0370.0335.91
4.3.70.0330.0275.91
4.3.60.0370.0275.91
4.3.50.0230.0235.91
4.3.40.0270.0405.91
4.3.30.0170.0205.91
4.3.20.0130.0275.91
4.3.10.0200.0205.91
4.3.00.0100.03014.42

preferences:
43.74 ms | 400 KiB | 5 Q