3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Spoke $key = 'This is the key'; $secret = "TRUSTNO1"; $request = array( 'license' => $key, 'authentication' => hash_hmac('sha256', $key, $secret), ); ?> <?php // Hub $key_index = array( 'This is the key' => 'TRUSTNO1' ); if ($auth = $request['authentication']) { if ($key = $request['license'] && $secret = $key_index['secret']) { $new_hash = hash_hmac('sha256', $key, $secret); if (hash_compare($new_hash, $auth)) { var_dump('Authenticated.'); } else { var_dump('Not authenticated'); } } }

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.00718.55
8.3.50.0180.00021.20
8.3.40.0070.00718.79
8.3.30.0070.00718.70
8.3.20.0040.00420.00
8.3.10.0050.00323.49
8.3.00.0080.00019.69
8.2.180.0090.00618.22
8.2.170.0110.00422.96
8.2.160.0070.00720.43
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0170.00026.16
8.2.120.0060.00320.98
8.2.110.0090.00022.01
8.2.100.0000.01217.88
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0130.00019.02
8.2.30.0040.00418.06
8.2.20.0000.00817.70
8.2.10.0070.00018.15
8.2.00.0040.00418.13
8.1.280.0160.00325.92
8.1.270.0060.01220.37
8.1.260.0080.00826.35
8.1.250.0150.00428.09
8.1.240.0100.00022.61
8.1.230.0040.00717.42
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0050.00318.65
8.1.160.0000.00722.03
8.1.150.0050.00318.84
8.1.140.0000.00817.52
8.1.130.0000.00817.64
8.1.120.0040.00417.55
8.1.110.0000.00717.43
8.1.100.0040.00417.49
8.1.90.0070.00017.36
8.1.80.0070.00317.44
8.1.70.0000.00717.47
8.1.60.0000.00817.63
8.1.50.0000.00717.53
8.1.40.0000.00817.57
8.1.30.0000.00817.53
8.1.20.0000.00817.70
8.1.10.0000.00717.59
8.1.00.0000.00717.57
8.0.300.0000.00718.77
8.0.290.0030.00516.75
8.0.280.0030.00318.46
8.0.270.0000.00817.28
8.0.260.0030.00817.26
8.0.250.0070.00017.04
8.0.240.0060.00016.93
8.0.230.0070.00016.95
8.0.220.0040.00416.89
8.0.210.0050.00216.95
8.0.200.0030.00317.05
8.0.190.0030.00516.94
8.0.180.0030.00516.93
8.0.170.0030.00517.03
8.0.160.0030.00317.00
8.0.150.0030.00316.94
8.0.140.0070.00016.96
8.0.130.0030.00313.45
8.0.120.0070.00016.89
8.0.110.0000.00816.91
8.0.100.0000.00717.05
8.0.90.0000.00716.88
8.0.80.0090.00616.95
8.0.70.0000.00816.93
8.0.60.0000.00716.91
8.0.50.0000.00817.08
8.0.30.0120.00816.89
8.0.20.0110.01117.40
8.0.10.0040.00417.00
8.0.00.0090.01016.88
7.4.330.0000.00615.08
7.4.320.0000.00616.61
7.4.300.0000.00616.43
7.4.290.0030.00516.50
7.4.280.0070.00016.58
7.4.270.0070.00016.47
7.4.260.0030.00316.49
7.4.250.0040.00416.55
7.4.240.0020.00516.51
7.4.230.0000.00716.52
7.4.220.0120.00916.46
7.4.210.0030.01316.65
7.4.200.0040.00416.48
7.4.160.0130.00316.77
7.4.150.0170.00917.40
7.4.140.0130.00817.86
7.4.130.0050.01216.61
7.4.120.0070.01016.57
7.4.110.0150.00316.50
7.4.100.0100.00616.50
7.4.90.0110.00616.74
7.4.80.0100.01019.39
7.4.70.0070.01416.73
7.4.60.0070.01016.63
7.4.50.0050.00316.48
7.4.40.0080.00816.53
7.4.30.0000.02216.41
7.4.00.0050.00514.94
7.3.330.0050.00013.02
7.3.320.0020.00213.09
7.3.310.0030.00316.14
7.3.300.0000.00716.10
7.3.290.0100.00616.34
7.3.280.0100.00716.34
7.3.270.0150.00917.40
7.3.260.0100.00716.34
7.3.250.0120.00616.43
7.3.240.0080.00816.23
7.3.230.0110.00516.40
7.3.210.0100.00616.55
7.3.200.0040.01216.52
7.3.190.0110.00616.48
7.3.180.0120.00916.55
7.3.170.0110.00716.34
7.3.160.0100.01016.40
7.2.330.0040.01416.54
7.2.320.0110.01216.66
7.2.310.0160.00316.34
7.2.300.0130.01116.73
7.2.290.0090.00916.79
7.2.00.0110.00319.45
7.1.100.0070.00318.21
7.1.70.0000.00716.86
7.1.60.0030.01719.12
7.1.50.0140.00016.87
7.1.00.0030.07722.46
7.0.200.0080.00416.47
7.0.60.0070.08319.89
7.0.50.0070.06317.78
7.0.40.0030.05720.07
7.0.30.0470.07320.20
7.0.20.0330.07020.04
7.0.10.0100.05720.08
7.0.00.0070.05320.01
5.6.280.0030.05021.07
5.6.210.0000.04320.51
5.6.200.0130.07318.22
5.6.190.0070.04720.77
5.6.180.0270.07720.45
5.6.170.0230.03720.41
5.6.160.0100.08020.51
5.6.150.0100.05718.14
5.6.140.0100.03318.18
5.6.130.0070.08318.21
5.6.120.0030.05021.01
5.6.110.0130.08020.94
5.6.100.0070.08321.00
5.6.90.0070.06021.03
5.6.80.0170.07020.43
5.6.70.0200.07720.36
5.5.350.0270.07020.43
5.5.340.0070.07317.91
5.5.330.0030.06020.20
5.5.320.0330.04020.24
5.5.310.0230.03720.17
5.5.300.0000.08018.00
5.5.290.0100.05717.96
5.5.280.0070.05320.98
5.5.270.0200.06720.84
5.5.260.0070.08320.87
5.5.250.0100.07720.66
5.5.240.0200.07320.12
5.4.450.0830.06319.45
5.4.440.0870.05019.58
5.4.430.0930.06719.09
5.4.420.0830.04319.47
5.4.410.0870.04019.37
5.4.400.0730.05318.92
5.4.390.0970.04318.81
5.4.380.0730.05319.28
5.4.370.0630.05019.21
5.4.360.0730.05719.18
5.4.350.0900.04019.21
5.4.340.0770.05019.21
5.4.320.0870.04318.91
5.4.310.0830.04319.32
5.4.300.0730.06019.14
5.4.290.0600.05319.30
5.4.280.0670.05019.27
5.4.270.0700.04718.91
5.4.260.0730.05718.77
5.4.250.0630.05319.13
5.4.240.0700.04319.11
5.4.230.0830.05718.94
5.4.220.0670.06319.14
5.4.210.0800.05019.14
5.4.200.0700.05718.98
5.4.190.0730.05018.98
5.4.180.0670.05719.07
5.4.170.0670.06019.17
5.4.160.0900.05318.87
5.4.150.0730.06018.80
5.4.140.0400.04716.40
5.4.130.0000.05716.25
5.4.120.0100.05316.40
5.4.110.0800.05316.19
5.4.100.0830.05316.29
5.4.90.0730.04716.50
5.4.80.0600.05316.47
5.4.70.0230.03316.37
5.4.60.0370.06016.45
5.4.50.0070.03016.36
5.4.40.0030.03716.47
5.4.30.0100.05716.15
5.4.20.0000.03316.48

preferences:
31.96 ms | 401 KiB | 5 Q