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 = 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.0140.00716.50
8.3.50.0080.01022.06
8.3.40.0110.00318.58
8.3.30.0140.00018.91
8.3.20.0000.00720.33
8.3.10.0050.00321.77
8.3.00.0080.00020.81
8.2.180.0110.01118.54
8.2.170.0120.00318.75
8.2.160.0100.00722.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00019.96
8.2.110.0030.00619.20
8.2.100.0040.00717.59
8.2.90.0040.00419.09
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0090.00017.93
8.2.50.0030.00618.07
8.2.40.0030.00718.03
8.2.30.0000.00718.00
8.2.20.0030.00617.55
8.2.10.0040.00418.06
8.2.00.0050.00217.59
8.1.280.0100.01025.92
8.1.270.0030.00620.48
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0030.00620.84
8.1.230.0110.00419.09
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0070.00317.10
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0030.00518.66
8.1.160.0000.00721.96
8.1.150.0060.00318.78
8.1.140.0060.00319.18
8.1.130.0000.00617.82
8.1.120.0040.00417.47
8.1.110.0000.00717.43
8.1.100.0030.00317.27
8.1.90.0000.00717.29
8.1.80.0030.00317.38
8.1.70.0030.00317.41
8.1.60.0040.00417.48
8.1.50.0000.00817.47
8.1.40.0040.00417.44
8.1.30.0000.00817.54
8.1.20.0000.00917.52
8.1.10.0040.00417.43
8.1.00.0080.00017.31
8.0.300.0050.00218.77
8.0.290.0000.00716.75
8.0.280.0040.00418.38
8.0.270.0070.00017.18
8.0.260.0000.00617.24
8.0.250.0030.00316.94
8.0.240.0070.00016.82
8.0.230.0050.00316.91
8.0.220.0070.00016.70
8.0.210.0070.00016.79
8.0.200.0080.00016.91
8.0.190.0000.00816.94
8.0.180.0070.00016.81
8.0.170.0040.00716.85
8.0.160.0080.00016.82
8.0.150.0050.00216.75
8.0.140.0000.00816.78
8.0.130.0030.00313.14
8.0.120.0040.00416.66
8.0.110.0070.00016.86
8.0.100.0080.00016.77
8.0.90.0040.00416.80
8.0.80.0000.01716.80
8.0.70.0050.00316.72
8.0.60.0050.00216.70
8.0.50.0000.00816.77
8.0.30.0070.01216.87
8.0.20.0140.00817.40
8.0.10.0040.00416.95
8.0.00.0080.00916.80
7.4.330.0000.00515.03
7.4.320.0060.00016.54
7.4.300.0000.00616.45
7.4.290.0000.00816.50
7.4.280.0060.00316.35
7.4.270.0070.00016.43
7.4.260.0040.00416.51
7.4.250.0050.00316.42
7.4.240.0030.00416.50
7.4.230.0000.00716.64
7.4.220.0070.01316.64
7.4.210.0080.00816.50
7.4.200.0070.00016.42
7.4.160.0090.00616.53
7.4.150.0100.01817.40
7.4.140.0090.00917.86
7.4.130.0110.00616.53
7.4.120.0070.01016.46
7.4.110.0130.01016.32
7.4.100.0070.01416.34
7.4.90.0060.01016.42
7.4.80.0050.01419.39
7.4.70.0100.01316.25
7.4.60.0130.00316.42
7.4.50.0070.00016.22
7.4.40.0130.00416.54
7.4.30.0130.01016.55
7.4.00.0030.01014.91
7.3.330.0070.00012.89
7.3.320.0050.00012.99
7.3.310.0030.00316.19
7.3.300.0000.00716.18
7.3.290.0030.00316.04
7.3.280.0120.00616.18
7.3.270.0090.01617.40
7.3.260.0100.01016.21
7.3.250.0110.01016.32
7.3.240.0070.01016.60
7.3.230.0040.01716.39
7.3.210.0090.00916.37
7.3.200.0140.00719.39
7.3.190.0080.01116.08
7.3.180.0070.00716.45
7.3.170.0030.01416.27
7.3.160.0130.00316.59
7.2.330.0140.00316.25
7.2.320.0060.01616.56
7.2.310.0050.01116.59
7.2.300.0050.01416.14
7.2.290.0100.00716.60
7.2.60.0060.00616.79
7.2.00.0040.01119.14
7.1.200.0070.00715.54
7.1.100.0030.00918.30
7.1.70.0080.00016.81
7.1.60.0140.00419.46
7.1.50.0120.00934.79
7.1.00.0000.07722.28
7.0.200.0150.00914.94
7.0.140.0000.05722.19
7.0.60.0130.06019.93
7.0.50.0030.04017.80
7.0.40.0070.05720.18
7.0.30.0070.04720.21
7.0.20.0300.05320.16
7.0.10.0100.05720.12
7.0.00.0100.05320.01
5.6.280.0100.07021.10
5.6.210.0100.04020.43
5.6.200.0130.04718.18
5.6.190.0130.04020.35
5.6.180.0230.08020.48
5.6.170.0300.07720.45
5.6.160.0170.05720.38
5.6.150.0030.04018.09
5.6.140.0070.07718.12
5.6.130.0000.08718.11
5.6.120.0030.04320.93
5.6.110.0130.04720.95
5.6.100.0070.08321.10
5.6.90.0000.06721.02
5.6.80.0130.06720.38
5.5.350.4230.04020.43
5.5.340.0000.04018.00
5.5.330.0070.09320.12
5.5.320.0300.08020.39
5.5.310.0230.04720.16
5.5.300.0070.08317.96
5.5.290.0130.07317.97
5.5.280.0130.05720.76
5.5.270.0000.04320.64
5.5.260.0100.06320.87
5.5.250.0170.05720.78
5.5.240.0130.07020.22
5.4.450.0130.04019.46
5.4.440.0170.03719.45
5.4.430.0200.04719.13
5.4.420.0170.03719.45
5.4.410.0170.03719.12
5.4.400.0100.04318.78
5.4.390.0130.04019.13
5.4.380.0130.03719.12
5.4.370.0130.03718.89
5.4.360.0200.03719.24
5.4.350.0170.04718.88
5.4.340.0130.03719.10
5.4.320.0170.05019.10
5.4.310.0270.03319.05
5.4.300.0130.03718.80
5.4.290.0170.03319.20
5.4.280.0200.03318.92
5.4.270.0200.03319.08
5.4.260.0200.04718.93
5.4.250.0130.03718.80
5.4.240.0170.08019.24
5.4.230.0230.07719.21
5.4.220.0270.07319.24
5.4.210.0200.07319.11
5.4.200.0200.05018.80
5.4.190.0330.07319.11
5.4.180.0400.06019.24
5.4.170.0300.07719.15
5.4.160.0230.03019.04
5.4.150.0200.03319.09
5.4.140.0270.05316.44
5.4.130.0170.03716.44
5.4.120.0300.05316.16
5.4.110.0270.06016.47
5.4.100.0230.06716.19
5.4.90.0170.05716.43
5.4.80.0170.04316.05
5.4.70.0170.04316.48
5.4.60.0300.05316.26
5.4.50.0200.04016.36
5.4.40.0200.03316.40
5.4.30.0270.06316.36
5.4.20.0170.04316.45
5.4.10.0130.05016.41
5.4.00.0130.04315.78
5.3.290.0170.03714.50
5.3.280.0130.04014.54
5.3.270.0230.04314.45
5.3.260.0200.04014.46
5.3.250.0300.03314.55
5.3.240.0200.03714.45
5.3.230.0200.05714.50
5.3.220.0230.03314.66
5.3.210.0270.03314.48
5.3.200.0200.06014.37
5.3.190.0130.05314.47
5.3.180.0200.03714.58
5.3.170.0230.04314.65
5.3.160.0230.06014.41
5.3.150.0330.05314.42
5.3.140.0330.03714.60
5.3.130.0170.04314.64
5.3.120.0270.06714.38
5.3.110.0270.04714.59
5.3.100.0300.06713.98
5.3.90.0230.06713.96
5.3.80.0230.04313.79
5.3.70.0270.04014.03
5.3.60.0270.06013.91
5.3.50.0200.04713.98
5.3.40.0270.03013.82
5.3.30.0230.06713.75
5.3.20.0230.07313.68
5.3.10.0230.07013.48
5.3.00.0270.06313.62
5.2.170.0130.04312.58
5.2.160.0130.03712.58
5.2.150.0200.04012.58
5.2.140.0230.03012.58
5.2.130.0170.02712.58
5.2.120.0170.03012.58
5.2.110.0230.02012.58
5.2.100.0170.02712.58
5.2.90.0200.05712.58
5.2.80.0170.06312.58
5.2.70.0230.06312.58
5.2.60.0170.04312.58
5.2.50.0300.03312.58
5.2.40.0200.05012.58
5.2.30.0170.03712.58
5.2.20.0200.03012.58
5.2.10.0100.04012.58
5.2.00.0130.04712.58
5.1.60.0170.02312.58
5.1.50.0200.04712.58
5.1.40.0200.03712.58
5.1.30.0230.02712.58
5.1.20.0130.02712.58
5.1.10.0230.04712.58
5.1.00.0230.02312.58
5.0.50.0100.04312.58
5.0.40.0170.03712.58
5.0.30.0070.04312.58
5.0.20.0170.01712.58
5.0.10.0070.02012.58
5.0.00.0100.05012.58
4.4.90.0100.03312.58
4.4.80.0100.03312.58
4.4.70.0070.03712.58
4.4.60.0070.02012.58
4.4.50.0070.02012.58
4.4.40.0100.05312.58
4.4.30.0100.03012.58
4.4.20.0170.02712.58
4.4.10.0070.03012.58
4.4.00.0100.03312.58
4.3.110.0100.02012.58
4.3.100.0130.02712.58
4.3.90.0130.01712.58
4.3.80.0130.05012.58
4.3.70.0030.02012.58
4.3.60.0070.02312.58
4.3.50.0100.01712.58
4.3.40.0030.05712.58
4.3.30.0030.02012.58
4.3.20.0030.01712.58
4.3.10.0030.01712.58
4.3.00.0030.01712.58

preferences:
34.22 ms | 401 KiB | 5 Q