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[$key]) { $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.0120.00618.77
8.3.50.0110.00721.10
8.3.40.0070.00718.85
8.3.30.0110.00418.93
8.3.20.0080.00020.39
8.3.10.0000.00823.65
8.3.00.0000.00819.68
8.2.180.0070.01318.54
8.2.170.0040.01122.96
8.2.160.0100.00320.52
8.2.150.0100.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00417.88
8.2.110.0060.00322.10
8.2.100.0060.00618.16
8.2.90.0040.00419.30
8.2.80.0080.00017.97
8.2.70.0060.00317.75
8.2.60.0030.00618.05
8.2.50.0000.00818.16
8.2.40.0070.00020.41
8.2.30.0020.00519.45
8.2.20.0030.00617.87
8.2.10.0000.00718.14
8.2.00.0040.00418.02
8.1.280.0060.01025.92
8.1.270.0040.01520.06
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00319.19
8.1.230.0050.00517.45
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0100.00017.38
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0040.00418.39
8.1.160.0000.00818.89
8.1.150.0000.00818.60
8.1.140.0040.00417.54
8.1.130.0000.00717.71
8.1.120.0000.00717.56
8.1.110.0040.00417.38
8.1.100.0040.00417.32
8.1.90.0040.00417.51
8.1.80.0040.00417.47
8.1.70.0000.00717.47
8.1.60.0040.00417.64
8.1.50.0000.00817.61
8.1.40.0080.00017.57
8.1.30.0030.00617.66
8.1.20.0000.00717.57
8.1.10.0040.00417.62
8.1.00.0000.00717.55
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00818.46
8.0.270.0030.00317.27
8.0.260.0030.00517.26
8.0.250.0040.00417.03
8.0.240.0030.00316.98
8.0.230.0000.00717.06
8.0.220.0030.00316.95
8.0.210.0070.00016.98
8.0.200.0040.00416.96
8.0.190.0000.00817.10
8.0.180.0060.00316.96
8.0.170.0040.00417.01
8.0.160.0030.00316.84
8.0.150.0000.00916.79
8.0.140.0030.00516.92
8.0.130.0040.00413.33
8.0.120.0020.00516.96
8.0.110.0000.00716.96
8.0.100.0070.00016.94
8.0.90.0020.00517.03
8.0.80.0070.01116.99
8.0.70.0030.00616.85
8.0.60.0040.00416.86
8.0.50.0040.00416.96
8.0.30.0090.00717.28
8.0.20.0120.01117.40
8.0.10.0040.00417.22
8.0.00.0070.01216.87
7.4.330.0030.00315.08
7.4.320.0000.00616.68
7.4.300.0030.00316.63
7.4.290.0030.00716.58
7.4.280.0040.00416.50
7.4.270.0070.00016.68
7.4.260.0040.00416.55
7.4.250.0000.00816.63
7.4.240.0050.00216.53
7.4.230.0000.00716.63
7.4.220.0120.01216.56
7.4.210.0000.01416.40
7.4.200.0070.00016.63
7.4.160.0090.00616.41
7.4.150.0140.01117.40
7.4.140.0110.00617.86
7.4.130.0060.01016.66
7.4.120.0080.01016.66
7.4.110.0090.00916.63
7.4.100.0070.01416.70
7.4.90.0100.01316.61
7.4.80.0130.00319.39
7.4.70.0140.00416.42
7.4.60.0120.00416.62
7.4.50.0060.00316.23
7.4.40.0130.00916.52
7.4.30.0140.00316.46
7.4.00.0080.00915.05
7.3.330.0020.00213.11
7.3.320.0050.00013.25
7.3.310.0030.00316.36
7.3.300.0030.00316.25
7.3.290.0110.00716.34
7.3.280.0140.00416.34
7.3.270.0060.01217.40
7.3.260.0140.00416.41
7.3.250.0090.00816.30
7.3.240.0100.00716.52
7.3.230.0060.01116.40
7.3.210.0080.00816.55
7.3.200.0000.01616.53
7.3.190.0090.01216.61
7.3.180.0040.01116.36
7.3.170.0120.00616.62
7.3.160.0060.01616.64
7.3.120.0100.00315.11
7.3.110.0100.01015.04
7.3.100.0100.00014.81
7.3.90.0040.01414.93
7.3.80.0000.01114.58
7.3.70.0090.00614.85
7.3.60.0100.00714.94
7.3.50.0040.00814.73
7.3.40.0040.00814.93
7.3.30.0000.01314.59
7.3.20.0070.00716.56
7.3.10.0050.01016.71
7.3.00.0070.00716.62
7.2.330.0110.00716.84
7.2.320.0080.00816.53
7.2.310.0120.01216.77
7.2.300.0150.00916.38
7.2.290.0060.01216.39
7.2.250.0070.01115.30
7.2.240.0130.00715.34
7.2.230.0060.00915.27
7.2.220.0030.00714.94
7.2.210.0030.01115.36
7.2.200.0030.00614.84
7.2.190.0030.01215.14
7.2.180.0000.01515.01
7.2.170.0060.01014.88
7.2.130.0130.00017.05
7.2.120.0110.00416.89
7.2.110.0030.00516.86
7.2.100.0150.00016.74
7.2.90.0060.00916.88
7.2.80.0030.00716.80
7.2.70.0070.01016.80
7.2.60.0080.00517.03
7.2.50.0030.00616.93
7.2.40.0050.00816.93
7.2.30.0070.01016.98
7.2.20.0180.00317.07
7.2.10.0120.00417.02
7.2.00.0020.01218.24
7.1.330.0130.00015.87
7.1.320.0040.00415.71
7.1.310.0110.00315.82
7.1.300.0100.00315.58
7.1.290.0030.00915.83
7.1.280.0060.00315.75
7.1.270.0040.00915.68
7.1.260.0110.00415.77
7.1.250.0000.01415.86
7.1.200.0050.00515.71
7.1.100.0110.01117.99
7.1.70.0040.00717.21
7.1.60.0030.01419.12
7.1.50.0070.01416.76
7.1.00.0000.08022.25
7.0.200.0030.00716.95
7.0.60.0030.05719.90
7.0.50.0030.08717.79
7.0.40.0130.08719.99
7.0.30.0530.06720.00
7.0.20.0130.05320.05
7.0.10.0030.07320.15
7.0.00.0170.07320.00
5.6.280.0030.04720.81
5.6.210.0130.07320.70
5.6.200.0200.07018.11
5.6.190.0100.06720.41
5.6.180.0400.06720.45
5.6.170.0170.04020.39
5.6.160.0030.05020.49
5.6.150.0070.04018.19
5.6.140.0070.04318.18
5.6.130.0030.07018.22
5.6.120.0100.07021.00
5.6.110.0130.07721.03
5.6.100.0030.04020.88
5.6.90.0130.07720.87
5.6.80.0000.08320.53
5.6.70.0230.07020.43
5.5.350.0370.07020.46
5.5.340.0030.03717.92
5.5.330.0030.04720.19
5.5.320.0400.07020.27
5.5.310.0200.07020.17
5.5.300.0000.05017.95
5.5.290.0100.08018.00
5.5.280.0170.08020.73
5.5.270.0070.08320.74
5.5.260.0100.08020.88
5.5.250.0100.09020.57
5.5.240.0100.03320.18
5.4.450.0670.06019.10
5.4.440.0800.05719.46
5.4.430.0730.04719.46
5.4.420.0630.05019.44
5.4.410.0630.06018.97
5.4.400.0630.05019.21
5.4.390.0570.06718.91
5.4.380.0530.06019.29
5.4.370.0630.05319.19
5.4.360.0670.05718.99
5.4.350.0700.04719.15
5.4.340.0600.05318.80
5.4.320.0630.05318.93
5.4.310.0730.04319.21
5.4.300.0800.07019.09
5.4.290.0570.05719.26
5.4.280.0700.06019.29
5.4.270.0630.05319.18
5.4.260.0530.05718.99
5.4.250.0670.04318.98
5.4.240.0630.05019.29
5.4.230.0670.04319.13
5.4.220.0730.04319.25
5.4.210.0630.05018.90
5.4.200.0670.04718.79
5.4.190.0800.05019.29
5.4.180.0770.05319.11
5.4.170.0900.04019.15
5.4.160.0730.05019.16
5.4.150.0830.06019.21
5.4.140.0770.05716.37
5.4.130.0600.05016.21
5.4.120.0770.03716.17
5.4.110.0700.06016.18
5.4.100.0600.05316.49
5.4.90.0770.06016.30
5.4.80.0630.04716.20
5.4.70.0230.04316.38
5.4.60.0330.07016.39
5.4.50.0000.03716.38
5.4.40.0000.03316.43
5.4.30.0070.06716.38
5.4.20.0030.03716.38

preferences:
52.71 ms | 401 KiB | 5 Q