3v4l.org

run code in 300+ PHP versions simultaneously
<?php $game_id = 2820; $client_seed = "gJyxdPdhqv"; $server_seed = "5a5e6a3494cf9572b6dc5dd6aee4263b6eec8b8f331e29c426d03f9ab6ade17f"; $idClientSeed = $client_seed . "-" . $game_id; $hex = hash_hmac("sha512", $idClientSeed, $server_seed); $index = 0; $lucky = hexdec(substr($hex, $index * 5, (($index * 5) - $index * 5 + 5))); while ($lucky >= 1e6) { $index += 1; $lucky = hexdec(substr($hex, $index * 5, (($index * 5) - $index * 5 + 5))); if ($index * 5 + 5 > 129) { $lucky = 9999; break; } } $number = ($lucky % 1e4) * 1e-2; echo "Roll: " . $number;

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.4.20.0080.01219.62
8.4.10.0030.00620.55
8.3.150.0130.00616.69
8.3.140.0160.00316.61
8.3.130.0030.00516.55
8.3.120.0040.00418.89
8.3.110.0270.00616.86
8.3.100.0330.00717.59
8.3.90.0290.00717.96
8.3.80.0300.00816.83
8.3.70.0220.01016.84
8.3.60.0280.00717.61
8.3.50.0210.01019.13
8.3.40.0270.00919.10
8.3.30.0220.00819.62
8.3.20.0160.00922.51
8.3.10.0160.00522.58
8.3.00.0130.00623.44
8.2.270.0040.01517.14
8.2.260.0000.01517.19
8.2.250.0090.00618.27
8.2.240.0090.00018.71
8.2.230.0150.00517.06
8.2.220.0220.00619.43
8.2.210.0190.00617.77
8.2.200.0200.00516.81
8.2.190.0180.00616.79
8.2.180.0240.00618.80
8.2.170.0230.00719.00
8.2.160.0170.00920.23
8.2.150.0200.00622.45
8.2.140.0130.00822.21
8.2.130.0140.00823.27
8.2.120.0160.00622.98
8.2.110.0150.00622.80
8.2.100.0150.00822.72
8.2.90.0170.00622.65
8.2.80.0150.00722.71
8.2.70.0110.00561.34
8.2.60.0140.00740.23
8.2.50.0150.00639.49
8.2.40.0130.00636.39
8.2.30.0130.00637.95
8.2.20.0120.00637.24
8.2.10.0130.00636.95
8.2.00.0130.00536.01
8.1.310.0070.00018.41
8.1.300.0090.00616.10
8.1.290.0220.00718.27
8.1.280.0220.00718.40
8.1.270.0160.00722.51
8.1.260.0140.00523.56
8.1.250.0140.00623.58
8.1.240.0140.00622.89
8.1.230.0140.00722.73
8.1.220.0150.00622.32
8.1.210.0150.00722.56
8.1.200.0140.00545.12
8.1.190.0140.00541.11
8.1.180.0140.00539.37
8.1.170.0130.00638.60
8.1.160.0150.00637.88
8.1.150.0150.00637.52
8.1.140.0140.00637.16
8.1.130.0140.00635.94
8.1.120.0130.00635.40
8.1.110.0140.00634.83
8.1.100.0140.00633.85
8.1.90.0130.00532.16
8.1.80.0140.00532.18
8.1.70.0130.00631.59
8.1.60.0130.00631.66
8.1.50.0130.00531.63
8.1.40.0120.00630.95
8.1.30.0130.00529.47
8.1.20.0140.00530.59
8.1.10.0140.00530.50
8.1.00.0130.00630.47
8.0.300.0150.00522.38
8.0.290.0160.00641.99
8.0.280.0160.00537.74
8.0.270.0130.00537.00
8.0.260.0140.00535.69
8.0.250.0130.00535.20
8.0.240.0150.00534.59
8.0.230.0140.00433.59
8.0.220.0130.00531.85
8.0.210.0130.00631.84
8.0.200.0130.00531.32
8.0.190.0140.00531.30
8.0.180.0130.00531.31
8.0.170.0140.00530.81
8.0.160.0120.00530.17
8.0.150.0140.00530.14
8.0.140.0140.00530.14
8.0.130.0130.00629.93
8.0.120.0130.00629.79
8.0.110.0120.00529.82
8.0.100.0130.00529.65
8.0.90.0130.00529.50
8.0.80.0120.00529.25
8.0.70.0110.00529.52
8.0.60.0140.00529.50
8.0.50.0140.00529.51
8.0.30.0110.00726.99
8.0.20.0130.00526.95
8.0.10.0140.00627.05
8.0.00.0120.00626.29
7.4.330.0120.00534.75
7.4.320.0150.00534.49
7.4.300.0140.00631.15
7.4.290.0150.00531.17
7.4.280.0140.00530.14
7.4.270.0150.00529.97
7.4.260.0160.00429.79
7.4.250.0150.00529.63
7.4.240.0150.00529.65
7.4.230.0150.00529.47
7.4.220.0140.00429.18
7.4.210.0140.00528.92
7.4.200.0140.00529.32
7.4.190.0140.00529.34
7.4.180.0140.00629.34
7.4.160.0140.00627.04
7.4.150.0130.00626.82
7.4.140.0130.00626.61
7.4.130.0130.00625.80
7.4.120.0140.00625.30
7.4.110.0130.00624.92
7.4.100.0130.00624.94
7.4.90.0120.00724.90
7.4.80.0130.00624.91
7.4.70.0130.00624.91
7.4.60.0130.00624.92
7.4.50.0130.00624.89
7.4.40.0130.00624.89
7.4.30.0130.00624.91
7.4.20.0130.00724.92
7.4.10.0140.00624.91
7.4.00.0120.00624.92
7.3.330.0140.00529.72
7.3.320.0140.00529.49
7.3.310.0140.00529.53
7.3.300.0150.00529.38
7.3.290.0140.00529.24
7.3.280.0140.00528.43
7.3.270.0140.00526.71
7.3.260.0140.00626.57
7.3.250.0140.00525.74
7.3.240.0140.00625.23
7.3.230.0140.00624.85
7.3.220.0140.00624.83
7.3.210.0140.00624.82
7.3.200.0140.00624.82
7.3.190.0140.00624.81
7.3.180.0140.00624.83
7.3.170.0140.00624.85
7.3.160.0140.00624.82
7.3.150.0140.00524.81
7.3.140.0140.00624.81
7.3.130.0130.00724.82
7.3.120.0130.00624.82
7.3.110.0140.00624.81
7.3.100.0140.00624.78
7.3.90.0130.00624.90
7.3.80.0140.00624.80
7.3.70.0140.00624.86
7.3.60.0140.00524.89
7.3.50.0140.00624.91
7.3.40.0140.00524.88
7.3.30.0130.00724.89
7.3.20.0150.00725.43
7.3.10.0140.00625.42
7.3.00.0150.00625.42
7.2.340.0150.00724.98
7.2.330.0150.00724.95
7.2.320.0150.00624.95
7.2.310.0150.00724.96
7.2.300.0140.00724.96
7.2.290.0140.00724.94
7.2.280.0140.00724.96
7.2.270.0140.00724.98
7.2.260.0150.00624.97
7.2.250.0140.00724.95
7.2.240.0150.00724.95
7.2.230.0140.00724.97
7.2.220.0140.00724.94
7.2.210.0150.00624.95
7.2.200.0150.00725.02
7.2.190.0150.00624.99
7.2.180.0150.00624.98
7.2.170.0150.00625.00
7.2.160.0140.00725.02
7.2.150.0160.00725.60
7.2.140.0160.00625.61
7.2.130.0160.00725.67
7.2.120.0160.00625.62
7.2.110.0170.00625.64
7.2.100.0150.00725.64
7.2.90.0160.00625.60
7.2.80.0160.00725.62
7.2.70.0160.00725.61
7.2.60.0170.00625.61
7.2.50.0150.00725.61
7.2.40.0160.00725.63
7.2.30.0150.00725.63
7.2.20.0150.00725.64
7.2.10.0160.00625.65
7.2.00.0160.00625.63
7.1.330.0120.01016.89
7.1.320.0180.00416.93
7.1.310.0150.00716.96
7.1.300.0160.00616.91
7.1.290.0190.00317.00
7.1.280.0170.00616.93
7.1.270.0170.00717.02
7.1.260.0180.00316.94
7.1.250.0210.00516.96
7.1.240.0160.00616.93
7.1.230.0170.00517.00
7.1.220.0190.00317.00
7.1.210.0170.00116.83
7.1.200.0170.00016.79
7.1.190.0150.00517.00
7.1.180.0160.00416.86
7.1.170.0160.00616.97
7.1.160.0150.00716.93
7.1.150.0170.00416.93
7.1.140.0190.00416.84
7.1.130.0120.01116.86
7.1.120.0160.00616.90
7.1.110.0180.00417.08
7.1.100.0180.00417.01
7.1.90.0150.00616.89
7.1.80.0180.00517.00
7.1.70.0160.00516.77
7.1.60.0160.00517.20
7.1.50.0160.00717.09
7.1.40.0180.00216.97
7.1.30.0150.00617.06
7.1.20.0150.00716.99
7.1.10.0120.00416.87
7.1.00.0130.00217.00
7.0.330.0120.00516.65
7.0.320.0120.00216.69
7.0.310.0110.00616.74
7.0.300.0110.00416.66
7.0.290.0160.00316.64
7.0.280.0150.00616.80
7.0.270.0190.00116.74
7.0.260.0160.00416.68
7.0.250.0160.00416.81
7.0.240.0200.00216.75
7.0.230.0150.00416.78
7.0.220.0150.00416.71
7.0.210.0130.00516.81
7.0.200.0110.00716.73
7.0.190.0150.00816.59
7.0.180.0170.00416.80
7.0.170.0140.00517.07
7.0.160.0160.00316.77
7.0.150.0100.00516.83
7.0.140.0100.00516.68
7.0.130.0200.00216.63
7.0.120.0180.00016.73
7.0.110.0110.00716.47
7.0.100.0160.00316.64
7.0.90.0160.00516.39
7.0.80.0140.00816.46
7.0.70.0190.00116.80
7.0.60.0170.00216.77
7.0.50.0190.00116.65
7.0.40.0120.00816.81
7.0.30.0150.00516.65
7.0.20.0150.00716.69
7.0.10.0160.00516.69
7.0.00.0170.00416.68
5.6.400.0150.00416.18
5.6.390.0200.00216.18
5.6.380.0130.00916.18
5.6.370.0170.00616.18
5.6.360.0180.00416.18
5.6.350.0150.00716.18
5.6.340.0180.00416.18
5.6.330.0150.00616.18
5.6.320.0190.00316.18
5.6.310.0140.00816.18
5.6.300.0150.00816.18
5.6.290.0220.00416.18
5.6.280.0160.00716.18
5.6.270.0200.00116.18
5.6.260.0160.00416.18
5.6.250.0150.00816.18
5.6.240.0180.00416.18
5.6.230.0140.00716.18
5.6.220.0170.00616.18
5.6.210.0170.00416.18
5.6.200.0180.00416.18
5.6.190.0160.00616.18
5.6.180.0190.00216.18
5.6.170.0160.00516.18
5.6.160.0110.00516.18
5.6.150.0120.00416.18
5.6.140.0200.00316.18
5.6.130.0150.00216.18
5.6.120.0210.00116.18
5.6.110.0160.00516.18
5.6.100.0160.00516.18
5.6.90.0140.00616.18
5.6.80.0160.00616.18
5.6.70.0150.00616.18
5.6.60.0180.00316.18
5.6.50.0160.00516.18
5.6.40.0150.00716.18
5.6.30.0180.00416.18
5.6.20.0200.00516.18
5.6.10.0170.00416.18
5.6.00.0190.00316.18
5.5.380.0150.00716.18
5.5.370.0170.00516.18
5.5.360.0180.00316.18
5.5.350.0170.00516.18
5.5.340.0170.00616.18
5.5.330.0160.00516.18
5.5.320.0170.00516.18
5.5.310.0170.00516.18
5.5.300.0160.00716.18
5.5.290.0240.00416.18
5.5.280.0130.00816.18
5.5.270.0180.00316.18
5.5.260.0180.00416.18
5.5.250.0150.00416.18
5.5.240.0150.00516.18
5.5.230.0100.00816.18
5.5.220.0120.00516.18
5.5.210.0150.00416.18
5.5.200.0160.00316.18
5.5.190.0150.00416.18
5.5.180.0120.00716.18
5.5.170.0160.00516.18
5.5.160.0140.00716.18
5.5.150.0160.00416.18
5.5.140.0160.00516.18
5.5.130.0140.00516.18
5.5.120.0170.00316.18
5.5.110.0220.00216.18
5.5.100.0150.00516.18
5.5.90.0190.00216.18
5.5.80.0190.00216.18
5.5.70.0200.00316.18
5.5.60.0190.00216.18
5.5.50.0160.00416.18
5.5.40.0130.00616.18
5.5.30.0120.00416.18
5.5.20.0130.00616.18
5.5.10.0140.00116.18
5.5.00.0150.00516.18
5.4.450.0130.00416.18
5.4.440.0140.00116.18
5.4.430.0100.00316.18
5.4.420.0150.00116.18
5.4.410.0070.00516.18
5.4.400.0150.00116.18
5.4.390.0100.00716.18
5.4.380.0130.00416.18
5.4.370.0120.00316.18
5.4.360.0080.00416.18
5.4.350.0090.00316.18
5.4.340.0070.00516.18
5.4.330.0140.00116.18
5.4.320.0090.00416.18
5.4.310.0110.00116.18
5.4.300.0130.00316.18
5.4.290.0100.00616.18
5.4.280.0100.00416.18
5.4.270.0080.00516.18
5.4.260.0080.00516.18
5.4.250.0070.00516.18
5.4.240.0100.00216.18
5.4.230.0100.00316.18
5.4.220.0110.00216.18
5.4.210.0100.00316.18
5.4.200.0090.00316.18
5.4.190.0090.00316.18
5.4.180.0090.00316.18
5.4.170.0090.00316.18
5.4.160.0090.00316.18
5.4.150.0080.00416.18
5.4.140.0090.00316.18
5.4.130.0080.00316.18
5.4.120.0090.00316.18
5.4.110.0080.00416.18
5.4.100.0100.00316.18
5.4.90.0110.00216.18
5.4.80.0080.00416.18
5.4.70.0080.00416.18
5.4.60.0100.00216.18
5.4.50.0080.00416.18
5.4.40.0070.00516.18
5.4.30.0090.00316.18
5.4.20.0100.00216.18
5.4.10.0110.00116.18
5.4.00.0110.00116.18
5.3.290.0100.00316.18
5.3.280.0100.00216.18
5.3.270.0070.00616.18
5.3.260.0100.00216.18
5.3.250.0090.00416.18
5.3.240.0090.00316.18
5.3.230.0120.00016.18
5.3.220.0100.00216.18
5.3.210.0110.00216.18
5.3.200.0090.00316.18
5.3.190.0070.00516.18
5.3.180.0110.00116.18
5.3.170.0090.00416.18
5.3.160.0090.00316.18
5.3.150.0080.00516.18
5.3.140.0060.00516.18
5.3.130.0100.00216.18
5.3.120.0110.00116.18
5.3.110.0160.00316.18
5.3.100.0090.00616.18
5.3.90.0120.00216.18
5.3.80.0090.00516.18
5.3.70.0110.00316.18
5.3.60.0120.00416.18
5.3.50.0100.00616.18
5.3.40.0130.00416.18
5.3.30.0090.00716.18
5.3.20.0150.00116.18
5.3.10.0100.00416.18
5.3.00.0130.00116.18
5.2.170.0110.00316.18
5.2.160.0120.00116.18
5.2.150.0080.00516.18
5.2.140.0080.00416.18
5.2.130.0070.00516.18
5.2.120.0090.00316.18
5.2.110.0060.00516.18
5.2.100.0100.00316.18
5.2.90.0120.00016.18
5.2.80.0060.00616.18
5.2.70.0090.00316.18
5.2.60.0090.00416.18
5.2.50.0110.00216.18
5.2.40.0140.00116.18
5.2.30.0090.00516.18
5.2.20.0110.00116.18
5.2.10.0120.00116.18
5.2.00.0080.00416.18
5.1.60.0100.00216.18
5.1.50.0070.00416.18
5.1.40.0080.00516.18
5.1.30.0110.00116.18
5.1.20.0120.00216.18
5.1.10.0070.00516.18
5.1.00.0100.00216.18
5.0.50.0050.00516.18
5.0.40.0080.00216.18
5.0.30.0040.00816.18
5.0.20.0080.00316.18
5.0.10.0030.00716.18
5.0.00.0080.00216.18
4.4.90.0030.00316.18
4.4.80.0030.00316.18
4.4.70.0040.00116.18
4.4.60.0060.00016.18
4.4.50.0030.00316.18
4.4.40.0040.00116.18
4.4.30.0040.00216.18
4.4.20.0030.00316.18
4.4.10.0050.00116.18
4.4.00.0040.00216.18
4.3.110.0060.00016.18
4.3.100.0030.00216.18
4.3.90.0060.00016.18
4.3.80.0050.00016.18
4.3.70.0030.00316.18
4.3.60.0040.00116.18
4.3.50.0020.00216.18
4.3.40.0040.00216.18
4.3.30.0030.00216.18
4.3.20.0020.00216.18
4.3.10.0010.00416.18
4.3.00.0030.00216.18

preferences:
31.1 ms | 403 KiB | 5 Q