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); var_dump($hash1); //$hash2 = base64_decode($encoded1); $hash2 = hash_hmac('sha256', $message, $secret, true); $encoded2 = base64_encode($hash2); var_dump(hash_equals($encoded1, $encoded2));

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.0030.01216.74
8.3.50.0140.00018.21
8.3.40.0060.00918.77
8.3.30.0070.00718.92
8.3.20.0000.00820.16
8.3.10.0060.00321.73
8.3.00.0030.00620.69
8.2.180.0150.00616.38
8.2.170.0110.00422.96
8.2.160.0070.00722.00
8.2.150.0050.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00319.41
8.2.110.0060.00322.25
8.2.100.0040.00817.97
8.2.90.0000.00719.27
8.2.80.0080.00017.97
8.2.70.0040.00417.37
8.2.60.0040.00417.91
8.2.50.0000.00818.07
8.2.40.0040.00418.03
8.2.30.0000.00717.90
8.2.20.0050.00217.69
8.2.10.0040.00417.99
8.2.00.0000.00917.70
8.1.280.0040.01125.92
8.1.270.0060.00320.56
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00322.11
8.1.230.0080.00319.08
8.1.220.0060.00317.74
8.1.210.0090.00018.77
8.1.200.0030.00617.22
8.1.190.0000.00817.10
8.1.180.0000.00718.10
8.1.170.0000.00818.49
8.1.160.0040.00421.97
8.1.150.0110.00018.84
8.1.140.0050.00319.22
8.1.130.0030.00317.79
8.1.120.0050.00317.30
8.1.110.0040.00417.23
8.1.100.0050.00317.31
8.1.90.0030.00417.39
8.1.80.0000.00717.46
8.1.70.0070.00017.30
8.1.60.0000.00917.47
8.1.50.0050.00317.53
8.1.40.0040.00417.50
8.1.30.0040.00417.46
8.1.20.0080.00017.50
8.1.10.0040.00417.35
8.1.00.0040.00417.37
8.0.300.0050.00218.77
8.0.290.0000.00716.63
8.0.280.0030.00318.33
8.0.270.0070.00017.05
8.0.260.0000.00617.25
8.0.250.0070.00016.91
8.0.240.0000.00716.88
8.0.230.0000.00716.80
8.0.220.0070.00016.83
8.0.210.0000.00716.83
8.0.200.0000.00616.89
8.0.190.0040.00416.95
8.0.180.0040.00416.82
8.0.170.0030.00616.92
8.0.160.0040.00416.86
8.0.150.0080.00016.75
8.0.140.0040.00416.78
8.0.130.0000.00613.33
8.0.120.0000.00716.77
8.0.110.0080.00016.87
8.0.100.0000.00716.82
8.0.90.0000.00816.86
8.0.80.0030.01316.72
8.0.70.0000.00716.88
8.0.60.0000.00816.89
8.0.50.0040.00416.93
8.0.30.0090.01516.84
8.0.20.0110.00817.40
8.0.10.0070.00017.06
8.0.00.0120.00616.67
7.4.330.0040.00415.03
7.4.320.0000.00616.43
7.4.300.0040.00416.50
7.4.290.0030.00316.53
7.4.280.0040.00416.36
7.4.270.0000.00816.57
7.4.260.0060.00316.54
7.4.250.0040.00416.42
7.4.240.0030.00416.46
7.4.230.0040.00416.59
7.4.220.0130.01016.41
7.4.210.0090.00616.57
7.4.200.0070.00016.34
7.4.160.0150.00616.52
7.4.150.0140.01117.40
7.4.140.0070.01017.86
7.4.130.0100.00716.44
7.4.120.0140.00316.51
7.4.110.0090.01016.43
7.4.100.0110.01216.48
7.4.90.0070.01016.38
7.4.80.0090.01219.39
7.4.70.0070.01016.50
7.4.60.0060.01016.37
7.4.50.0040.00416.29
7.4.40.0130.00416.36
7.4.30.0110.01116.28
7.4.00.0100.00714.71
7.3.330.0000.00513.06
7.3.320.0000.00513.13
7.3.310.0030.00316.18
7.3.300.0060.00016.13
7.3.290.0030.00315.96
7.3.280.0060.01116.13
7.3.270.0070.01117.40
7.3.260.0160.00816.16
7.3.250.0100.01016.31
7.3.240.0130.00416.15
7.3.230.0110.01116.39
7.3.210.0090.00616.48
7.3.200.0100.01019.39
7.3.190.0060.00916.43
7.3.180.0070.01116.34
7.3.170.0170.00316.27
7.3.160.0060.00916.43
7.2.330.0030.01316.58
7.2.320.0100.00716.31
7.2.310.0090.00716.63
7.2.300.0070.01016.50
7.2.290.0140.00316.29
7.2.60.0070.00716.70
7.2.00.0000.00819.20
7.1.200.0130.00015.76
7.1.100.0080.00418.16
7.1.70.0000.00816.89
7.1.60.0100.00719.46
7.1.50.0100.01316.88
7.1.00.0030.07722.45
7.0.200.0070.00314.89
7.0.140.0000.04021.97
7.0.60.0100.06019.89
7.0.50.0170.07017.80
7.0.40.0100.08320.04
7.0.30.0730.05720.01
7.0.20.0200.05020.17
7.0.10.0070.09020.16
7.0.00.0070.07320.12
5.6.280.0000.07320.91
5.6.210.0030.08320.74
5.6.200.0100.08018.11
5.6.190.0130.03720.39
5.6.180.0300.07320.64
5.6.170.0200.06020.33
5.6.160.0070.07720.38
5.6.150.0130.05718.07
5.6.140.0100.07718.09
5.6.130.0130.07318.18
5.6.120.0070.06021.17
5.6.110.0130.07320.98
5.6.100.0000.09020.97
5.6.90.0130.07320.97
5.6.80.0030.08320.38
5.5.350.0300.07320.38
5.5.340.0030.04017.89
5.5.330.0070.06320.23
5.5.320.0000.04020.13
5.5.310.0300.06020.24
5.5.300.0070.04317.91
5.5.290.0030.04317.96
5.5.280.0130.08020.87
5.5.270.0000.04720.77
5.5.260.0200.07320.73
5.5.250.0070.08720.68
5.5.240.0030.04020.16
5.4.450.0670.05019.45
5.4.440.0600.06719.41
5.4.430.0870.06719.41
5.4.420.0930.06019.51
5.4.410.0630.06319.34
5.4.400.1030.05318.95
5.4.390.0700.04718.67
5.4.380.0670.06018.60
5.4.370.0830.04318.73
5.4.360.0800.04018.72
5.4.350.0800.07018.58
5.4.340.0900.07318.52
5.4.320.0930.07018.44
5.4.310.0930.07018.62
5.4.300.1170.06718.74
5.4.290.1030.06718.71
5.4.280.0900.05718.49
5.4.270.0830.05718.50
5.4.260.0900.04718.46
5.4.250.1030.06318.77
5.4.240.0870.05718.55
5.4.230.0730.05018.55
5.4.220.0700.07318.48
5.4.210.0900.08018.58
5.4.200.0700.05316.46
5.4.190.0730.06018.67
5.4.180.1030.04718.57
5.4.170.1030.05718.70
5.4.160.1130.04718.71
5.4.150.0870.05718.67
5.4.140.0670.06716.21
5.4.130.0430.06016.18
5.4.120.0130.05016.17
5.4.110.0200.06016.14
5.4.100.0970.06716.08
5.4.90.0930.07316.07
5.4.80.1230.05716.26
5.4.70.0770.07016.13
5.4.60.0800.05016.21
5.4.50.0900.05316.32
5.4.40.0700.05316.20
5.4.30.0830.05016.10
5.4.20.0870.06016.32
5.4.10.0770.06016.11
5.4.00.0870.05015.54
5.3.290.0830.06714.70
5.3.280.0870.05314.57
5.3.270.1070.07314.57
5.3.260.0930.06314.54
5.3.250.0770.04714.53
5.3.240.0800.07714.55
5.3.230.0900.05314.64
5.3.220.0930.05014.60
5.3.210.0800.06314.66
5.3.200.0870.05714.48
5.3.190.0930.05314.66
5.3.180.0770.05714.61
5.3.170.0830.05714.61
5.3.160.0900.07714.47
5.3.150.0730.05714.54
5.3.140.0830.05014.46
5.3.130.0600.06714.53
5.3.120.1000.07314.52
5.3.110.1270.06014.54
5.3.100.1000.04713.95
5.3.90.1170.06714.00
5.3.80.1200.06313.91
5.3.70.0700.05014.11
5.3.60.1030.04314.00
5.3.50.1070.04713.84
5.3.40.0970.05714.02
5.3.30.0870.04713.89
5.3.20.0800.05713.68
5.3.10.0870.05013.57
5.3.00.0930.04713.61
5.2.170.0700.04711.29
5.2.160.0730.05311.29
5.2.150.0830.04311.05
5.2.140.0630.05011.10
5.2.130.0600.05011.11
5.2.120.0430.04711.13
5.2.110.0700.04311.27
5.2.100.0700.04311.16
5.2.90.0700.04311.13
5.2.80.0670.04711.23
5.2.70.0870.04011.15
5.2.60.0730.04011.08
5.2.50.0800.04010.98
5.2.40.0700.04011.03
5.2.30.0570.04311.02
5.2.20.0470.05710.96
5.2.10.0670.04310.89
5.2.00.0770.04010.68
5.1.60.0270.0339.96
5.1.50.0430.03310.05
5.1.40.0500.0339.98
5.1.30.0400.05310.29
5.1.20.0470.04310.41
5.1.10.0470.04010.09
5.1.00.0600.03010.09
5.0.50.0300.0378.54
5.0.40.0230.0378.43
5.0.30.0370.0508.33
5.0.20.0230.0308.33
5.0.10.0200.0338.24
5.0.00.0300.0438.18
4.4.90.0100.0335.90
4.4.80.0300.0235.93
4.4.70.0300.0235.91
4.4.60.0270.0205.90
4.4.50.0230.0335.89
4.4.40.0300.0405.89
4.4.30.0200.0235.89
4.4.20.0230.0235.98
4.4.10.0330.0275.98
4.4.00.0330.0335.97
4.3.110.0270.0275.89
4.3.100.0270.0275.89
4.3.90.0270.0205.89
4.3.80.0330.0435.89
4.3.70.0270.0335.89
4.3.60.0400.0205.89
4.3.50.0300.0235.89
4.3.40.0230.0405.89
4.3.30.0100.0275.89
4.3.20.0100.0275.89
4.3.10.0170.0205.89
4.3.00.0030.03314.42

preferences:
41.79 ms | 400 KiB | 5 Q