3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'Message'; $secret = 'secret'; $hash1 = hash_hmac('sha256', $message, $secret, true); $encoded1 = base64_encode($hash1); $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.0150.00616.63
8.3.50.0100.00921.98
8.3.40.0120.00618.59
8.3.30.0100.00318.92
8.3.20.0070.00020.21
8.3.10.0000.00821.78
8.3.00.0040.00420.77
8.2.180.0110.00718.41
8.2.170.0040.01118.91
8.2.160.0150.00622.96
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0060.00617.68
8.2.110.0060.00320.44
8.2.100.0040.01118.09
8.2.90.0040.00419.05
8.2.80.0040.00817.97
8.2.70.0080.00017.25
8.2.60.0070.00317.80
8.2.50.0080.00318.07
8.2.40.0000.00718.03
8.2.30.0030.00517.96
8.2.20.0080.00017.48
8.2.10.0000.00717.95
8.2.00.0070.00017.67
8.1.280.0140.00325.92
8.1.270.0040.00420.48
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00424.00
8.1.230.0070.00719.00
8.1.220.0000.00717.79
8.1.210.0050.00318.77
8.1.200.0100.00017.23
8.1.190.0040.00417.10
8.1.180.0000.00918.10
8.1.170.0050.00318.65
8.1.160.0040.00422.00
8.1.150.0000.01018.79
8.1.140.0000.00819.11
8.1.130.0030.00317.85
8.1.120.0060.00617.39
8.1.110.0000.00717.35
8.1.100.0000.00717.39
8.1.90.0070.00017.43
8.1.80.0070.00017.22
8.1.70.0030.00317.33
8.1.60.0030.00617.52
8.1.50.0050.00317.41
8.1.40.0040.00417.42
8.1.30.0000.00817.52
8.1.20.0000.00717.46
8.1.10.0050.00317.29
8.1.00.0000.00717.39
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0000.00718.37
8.0.270.0030.00317.12
8.0.260.0000.00617.13
8.0.250.0000.00716.91
8.0.240.0000.00716.84
8.0.230.0040.00416.77
8.0.220.0070.00016.75
8.0.210.0070.00016.80
8.0.200.0040.00416.83
8.0.190.0080.00016.86
8.0.180.0050.00316.83
8.0.170.0040.00416.85
8.0.160.0000.00816.86
8.0.150.0040.00416.73
8.0.140.0000.00716.79
8.0.130.0050.00013.20
8.0.120.0040.00416.68
8.0.110.0050.00316.75
8.0.100.0040.00416.64
8.0.90.0080.00016.77
8.0.80.0070.01016.82
8.0.70.0040.00416.68
8.0.60.0080.00016.61
8.0.50.0040.00416.75
8.0.30.0100.01417.10
8.0.20.0090.01017.40
8.0.10.0070.00016.81
8.0.00.0090.00816.62
7.4.330.0040.00415.03
7.4.320.0060.00016.33
7.4.300.0060.00016.48
7.4.290.0070.00016.52
7.4.280.0000.00716.54
7.4.270.0000.00716.44
7.4.260.0000.00716.36
7.4.250.0040.00416.31
7.4.240.0070.00016.39
7.4.230.0000.00716.41
7.4.220.0140.00316.50
7.4.210.0100.00816.45
7.4.200.0070.00016.41
7.4.160.0070.01416.44
7.4.150.0100.00717.40
7.4.140.0060.01117.86
7.4.130.0110.00716.34
7.4.120.0080.00816.50
7.4.110.0040.01216.43
7.4.100.0080.01216.33
7.4.90.0100.00616.43
7.4.80.0140.01419.39
7.4.70.0110.01416.33
7.4.60.0120.00316.48
7.4.50.0000.00816.39
7.4.40.0070.01316.49
7.4.30.0090.00916.42
7.4.00.0070.00914.95
7.3.330.0030.00313.02
7.3.320.0000.00713.01
7.3.310.0060.00016.06
7.3.300.0070.00015.97
7.3.290.0000.00716.18
7.3.280.0080.01016.13
7.3.270.0160.00317.40
7.3.260.0130.00716.29
7.3.250.0090.00916.15
7.3.240.0060.01216.14
7.3.230.0100.01316.39
7.3.210.0050.01116.18
7.3.200.0060.01819.39
7.3.190.0090.00716.18
7.3.180.0000.01516.03
7.3.170.0140.00416.37
7.3.160.0060.00916.13
7.3.120.0080.01114.84
7.3.110.0050.01314.77
7.3.100.0050.00814.66
7.3.90.0060.00714.64
7.3.80.0080.00514.93
7.3.70.0070.00714.82
7.3.60.0080.00914.60
7.3.50.0070.00614.55
7.3.40.0060.00714.79
7.3.30.0030.01014.62
7.3.20.0070.00516.65
7.3.10.0090.00616.59
7.3.00.0090.00616.63
7.2.330.0090.01216.47
7.2.320.0090.00616.27
7.2.310.0160.00016.30
7.2.300.0100.00816.41
7.2.290.0110.01116.40
7.2.250.0060.01315.00
7.2.240.0150.00314.99
7.2.230.0080.00815.02
7.2.220.0070.00514.96
7.2.210.0040.01214.94
7.2.200.0110.00514.81
7.2.190.0030.01014.86
7.2.180.0040.00914.84
7.2.170.0060.00714.68
7.2.60.0090.00316.77
7.2.00.0030.00619.34
7.1.330.0060.00715.55
7.1.320.0030.00915.67
7.1.310.0050.00615.89
7.1.300.0020.01015.66
7.1.290.0050.00815.72
7.1.280.0020.01115.58
7.1.270.0050.00715.55
7.1.260.0070.00415.74
7.1.200.0040.01115.74
7.1.100.0060.00618.03
7.1.70.0030.00617.05
7.1.60.0060.01919.46
7.1.50.0120.00634.77
7.1.00.0100.06722.27
7.0.200.0160.00014.68
7.0.140.0070.04321.97
7.0.60.0170.06719.84
7.0.50.0070.07317.82
7.0.40.0000.08319.99
7.0.30.0270.06720.21
7.0.20.0330.06720.33
7.0.10.0030.08320.17
7.0.00.0100.04020.32
5.6.280.0100.06721.04
5.6.210.0070.05020.66
5.6.200.0070.04718.23
5.6.190.0030.05020.37
5.6.180.0430.07320.77
5.6.170.0230.06020.48
5.6.160.0100.04020.40
5.6.150.0170.06718.16
5.6.140.0000.09318.11
5.6.130.0030.09018.16
5.6.120.0130.07320.93
5.6.110.0130.07721.00
5.6.100.0170.08021.02
5.6.90.0030.09021.01
5.6.80.0200.04020.50
5.5.350.0230.08020.49
5.5.340.0100.08018.02
5.5.330.0100.04720.15
5.5.320.0370.07720.30
5.5.310.0300.07020.29
5.5.300.0070.05017.91
5.5.290.0100.04317.98
5.5.280.0030.04020.76
5.5.270.0070.08320.75
5.5.260.0100.06720.76
5.5.250.0130.07320.56
5.5.240.0070.03320.25
5.4.450.0470.06019.52
5.4.440.0300.06719.10
5.4.430.0100.07019.10
5.4.420.0300.07019.32
5.4.410.0100.05319.14
5.4.400.0270.04718.95
5.4.390.1000.06718.65
5.4.380.1030.06318.52
5.4.370.1070.05318.65
5.4.360.0870.07718.65
5.4.350.1070.06018.49
5.4.340.0830.06018.71
5.4.320.0970.07018.44
5.4.310.1230.05018.53
5.4.300.1200.06718.49
5.4.290.0930.06018.56
5.4.280.1000.06018.73
5.4.270.0800.05718.62
5.4.260.1030.06718.61
5.4.250.1000.06018.56
5.4.240.0630.06018.50
5.4.230.0730.06018.67
5.4.220.1000.05718.64
5.4.210.0700.05318.48
5.4.200.1070.05316.41
5.4.190.0970.05018.66
5.4.180.0970.05318.70
5.4.170.0900.05318.70
5.4.160.0830.06018.58
5.4.150.0800.06718.75
5.4.140.0800.08316.30
5.4.130.1000.05716.06
5.4.120.0770.05716.08
5.4.110.0970.05016.04
5.4.100.0770.06016.15
5.4.90.0830.07316.07
5.4.80.0830.04716.13
5.4.70.0830.06716.10
5.4.60.1030.07016.22
5.4.50.0800.07016.11
5.4.40.0770.05716.21
5.4.30.1000.04016.22
5.4.20.1030.06316.32
5.4.10.0630.05316.21
5.4.00.0030.05715.62
5.3.290.0400.07014.57
5.3.280.0900.06014.54
5.3.270.0670.07714.55
5.3.260.0900.06714.54
5.3.250.0730.06014.51
5.3.240.0900.06314.52
5.3.230.1000.05014.70
5.3.220.0870.06714.61
5.3.210.0900.07314.55
5.3.200.0870.06014.48
5.3.190.1270.04714.57
5.3.180.1000.06714.49
5.3.170.0800.05014.50
5.3.160.0830.05714.55
5.3.150.0930.05014.61
5.3.140.0770.06714.65
5.3.130.0830.05314.44
5.3.120.0900.06714.57
5.3.110.1000.06714.52
5.3.100.0830.05314.04
5.3.90.0900.06013.98
5.3.80.1100.05014.00
5.3.70.1070.04713.96
5.3.60.1030.04714.00
5.3.50.1000.04013.89
5.3.40.1000.05013.84
5.3.30.0970.05013.82
5.3.20.0900.05313.79
5.3.10.0830.05013.73
5.3.00.0770.06313.55
5.2.170.0730.05011.20
5.2.160.0870.04011.17
5.2.150.0800.04311.30
5.2.140.0930.06011.18
5.2.130.0870.03311.09
5.2.120.0700.04011.25
5.2.110.0800.03711.26
5.2.100.0630.05311.27
5.2.90.0770.04311.26
5.2.80.0700.04711.10
5.2.70.0800.04311.26
5.2.60.0800.04711.08
5.2.50.0830.05010.99
5.2.40.0600.04311.05
5.2.30.0570.04310.96
5.2.20.0630.04310.92
5.2.10.0600.04010.96
5.2.00.0670.04010.75
5.1.60.0600.03710.09
5.1.50.0630.0409.96
5.1.40.0700.03310.01
5.1.30.0530.04310.29
5.1.20.0530.04710.46
5.1.10.0670.04710.18
5.1.00.0670.04310.04
5.0.50.0430.0238.61
5.0.40.0500.0338.40
5.0.30.0370.0578.27
5.0.20.0400.0238.32
5.0.10.0400.0278.18
5.0.00.0400.0478.15
4.4.90.0330.0235.91
4.4.80.0400.0175.91
4.4.70.0300.0305.91
4.4.60.0400.0205.91
4.4.50.0330.0235.91
4.4.40.0400.0375.91
4.4.30.0270.0275.91
4.4.20.0330.0275.93
4.4.10.0370.0205.97
4.4.00.0370.0335.91
4.3.110.0370.0305.91
4.3.100.0400.0235.91
4.3.90.0300.0235.91
4.3.80.0270.0375.91
4.3.70.0400.0235.91
4.3.60.0370.0205.91
4.3.50.0270.0235.91
4.3.40.0370.0305.91
4.3.30.0130.0275.91
4.3.20.0200.0275.91
4.3.10.0230.0175.91
4.3.00.0170.0306.98

preferences:
49.37 ms | 401 KiB | 5 Q