3v4l.org

run code in 300+ PHP versions simultaneously
<?php // ------- INPUT DATA PART --------- $secured_server_seed = ''; // Input the server seed if you want to validate it $server_seed = ''; $client_seed = ''; $nonce = 0; $roll = 0; // ------- INPUT DATA PART END --------- if (!empty($secured_server_seed)) { $hash_seed = hash('sha256', $server_seed); echo "Server seed: " . (strtolower($secured_server_seed) === strtolower($hash_seed) ? 'valid' : 'invalid') . "\n"; } $game_hash = hash_hmac('sha512', $server_seed, $client_seed . '-' . $nonce); $roll_game = 1 + hexdec(substr($game_hash, 0, 7)) % 10000000; echo "Roll value for \"$nonce\" nonce: $roll_game\n"; echo "Roll is " . ($roll_game === $roll ? 'valid' : 'invalid') . "\n";

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.0190.00016.50
8.3.50.0100.00318.24
8.3.40.0150.00418.67
8.3.30.0080.00818.71
8.3.20.0040.00424.18
8.3.10.0080.00524.66
8.3.00.0090.00726.30
8.2.180.0180.00025.92
8.2.170.0070.01418.85
8.2.160.0040.01122.96
8.2.150.0090.00025.66
8.2.140.0090.00424.66
8.2.130.0070.00826.30
8.2.120.0070.00924.45
8.2.110.0070.00922.64
8.2.100.0100.00722.38
8.2.90.0080.00723.07
8.2.80.0110.00422.34
8.2.70.0140.00621.31
8.2.60.0140.00720.61
8.2.50.0120.00620.25
8.2.40.0130.00520.62
8.2.30.0110.00520.62
8.2.20.0100.00520.31
8.2.10.0100.00520.48
8.2.00.0100.00520.50
8.1.280.0000.01725.92
8.1.270.0080.00023.36
8.1.260.0090.00427.51
8.1.250.0080.00226.95
8.1.240.0080.00823.29
8.1.230.0070.00623.45
8.1.220.0070.00522.24
8.1.210.0060.00723.30
8.1.200.0090.00521.13
8.1.190.0080.00721.00
8.1.180.0090.00720.16
8.1.170.0100.00420.26
8.1.160.0110.00520.54
8.1.150.0120.00520.57
8.1.140.0110.00420.29
8.1.130.0120.00520.16
8.1.120.0090.00620.16
8.1.110.0090.00719.92
8.1.100.0100.00519.50
8.1.90.0100.00519.47
8.1.80.0110.00519.50
8.1.70.0080.00619.18
8.1.60.0110.00519.23
8.1.50.0100.00519.21
8.1.40.0100.00619.08
8.1.30.0100.00619.14
8.1.20.0110.00519.14
8.1.10.0110.00619.07
8.1.00.0130.00519.00
8.0.300.0080.00422.66
8.0.290.0090.00620.78
8.0.280.0100.00520.26
8.0.270.0090.00419.86
8.0.260.0090.00519.33
8.0.250.0110.00419.91
8.0.240.0120.00419.57
8.0.230.0090.00519.32
8.0.220.0100.00419.08
8.0.210.0100.00519.08
8.0.200.0110.00418.97
8.0.190.0100.00518.81
8.0.180.0100.00518.82
8.0.170.0100.00518.69
8.0.160.0110.00518.66
8.0.150.0100.00618.63
8.0.140.0120.00418.64
8.0.130.0120.00518.42
8.0.120.0130.00418.63
8.0.110.0090.00618.64
8.0.100.0110.00518.63
8.0.90.0110.00418.62
8.0.80.0120.00518.29
8.0.70.0110.00618.64
8.0.60.0140.00518.62
8.0.50.0130.00518.63
8.0.30.0120.00617.95
8.0.20.0120.00617.99
8.0.10.0130.00618.04
8.0.00.0120.00618.18
7.4.330.0080.00319.48
7.4.320.0110.00519.50
7.4.300.0120.00618.54
7.4.290.0090.00718.70
7.4.280.0110.00518.50
7.4.270.0110.00418.58
7.4.260.0110.00518.34
7.4.250.0120.00618.58
7.4.240.0110.00518.47
7.4.230.0130.00418.48
7.4.220.0120.00418.61
7.4.210.0080.00718.15
7.4.200.0120.00518.58
7.4.190.0110.00618.47
7.4.180.0130.00418.63
7.4.160.0130.00617.88
7.4.150.0120.00717.79
7.4.140.0110.00717.73
7.4.130.0120.00717.66
7.4.120.0110.00717.75
7.4.110.0120.00617.66
7.4.100.0120.00617.69
7.4.90.0130.00617.67
7.4.80.0110.00717.65
7.4.70.0120.00717.66
7.4.60.0120.00717.64
7.4.50.0120.00717.61
7.4.40.0120.00617.62
7.4.30.0120.00717.65
7.4.20.0120.00617.65
7.4.10.0110.00717.68
7.4.00.0100.00717.68
7.3.330.0110.00518.49
7.3.320.0110.00518.14
7.3.310.0120.00418.37
7.3.300.0120.00518.33
7.3.290.0130.00518.38
7.3.280.0120.00618.00
7.3.270.0130.00717.59
7.3.260.0130.00617.60
7.3.250.0140.00617.59
7.3.240.0140.00617.56
7.3.230.0140.00617.57
7.3.220.0130.00717.54
7.3.210.0150.00517.54
7.3.200.0120.00717.54
7.3.190.0140.00617.57
7.3.180.0130.00717.57
7.3.170.0130.00717.53
7.3.160.0130.00817.56
7.3.150.0140.00617.55
7.3.140.0140.00717.56
7.3.130.0150.00617.53
7.3.120.0150.00517.54
7.3.110.0150.00517.51
7.3.100.0130.00717.50
7.3.90.0130.00717.71
7.3.80.0140.00617.55
7.3.70.0140.00617.56
7.3.60.0130.00717.64
7.3.50.0130.00717.61
7.3.40.0120.00817.60
7.3.30.0140.00617.59
7.3.20.0140.00617.81
7.3.10.0160.00617.86
7.3.00.0140.00617.85
7.2.340.0100.00626.38
7.2.330.0090.00726.38
7.2.320.0150.00126.38
7.2.310.0130.00326.38
7.2.300.0130.00426.38
7.2.290.0160.00026.38
7.2.280.0150.00226.38
7.2.270.0110.00626.38
7.2.260.0130.00526.38
7.2.250.0110.00726.38
7.2.240.0180.00226.38
7.2.230.0160.00126.38
7.2.220.0110.00626.38
7.2.210.0140.00326.38
7.2.200.0120.00626.38
7.2.190.0170.00426.38
7.2.180.0160.00426.38
7.2.170.0140.00526.38
7.2.160.0130.00426.38
7.2.150.0140.00426.38
7.2.140.0160.00226.38
7.2.130.0170.00426.38
7.2.120.0170.00826.38
7.2.110.0200.00826.38
7.2.100.0110.00626.38
7.2.90.0240.00326.38
7.2.80.0210.00026.38
7.2.70.0180.00326.38
7.2.60.0130.00426.38
7.2.50.0130.00426.38
7.2.40.0300.00326.38
7.2.30.0150.00326.38
7.2.20.0180.00926.38
7.2.10.0180.00826.38
7.2.00.0160.01026.38
7.1.330.0140.00426.38
7.1.320.0150.00426.38
7.1.310.0170.00326.38
7.1.300.0160.00226.38
7.1.290.0170.00026.38
7.1.280.0150.00226.38
7.1.270.0100.00526.38
7.1.260.0140.00126.38
7.1.250.0110.00426.38
7.1.240.0100.00626.38
7.1.230.0150.00126.38
7.1.220.0130.00426.38
7.1.210.0160.00026.38
7.1.200.0160.00026.38
7.1.190.0110.00526.38
7.1.180.0070.00826.38
7.1.170.0100.00626.38
7.1.160.0330.00226.38
7.1.150.0210.00226.38
7.1.140.0140.00626.38
7.1.130.0120.00426.38
7.1.120.0190.00526.38
7.1.110.0210.00326.38
7.1.100.0190.00626.38
7.1.90.0250.00126.38
7.1.80.0140.00526.38
7.1.70.0110.00426.38
7.1.60.0170.00326.38
7.1.50.0130.00626.38
7.1.40.0140.00426.38
7.1.30.0130.00526.38
7.1.20.0170.00026.38
7.1.10.0140.00226.38
7.1.00.0120.00326.38
7.0.330.0140.00126.38
7.0.320.0140.00026.38
7.0.310.0130.00226.38
7.0.300.0120.00426.38
7.0.290.0120.00326.38
7.0.280.0290.00426.38
7.0.270.0150.00026.38
7.0.260.0160.00026.38
7.0.250.0110.00626.38
7.0.240.0120.00426.38
7.0.230.0130.00426.38
7.0.220.0130.00326.38
7.0.210.0140.00126.38
7.0.200.0140.00126.38
7.0.190.0140.00326.38
7.0.180.0140.00226.38
7.0.170.0130.00226.38
7.0.160.0130.00226.38
7.0.150.0120.00426.38
7.0.140.0110.00526.38
7.0.130.0160.00226.38
7.0.120.0150.00426.38
7.0.110.0140.00426.38
7.0.100.0100.00426.38
7.0.90.0120.00026.38
7.0.80.0100.00226.38
7.0.70.0090.00226.38
7.0.60.0260.00226.38
7.0.50.0110.00126.38
7.0.40.0050.00726.38
7.0.30.0120.00726.38
7.0.20.0110.00126.38
7.0.10.0070.00526.38
7.0.00.0120.00026.38
5.6.400.0100.00426.38
5.6.390.0130.00226.38
5.6.380.0100.00426.38
5.6.370.0070.00726.38
5.6.360.0130.00326.38
5.6.350.0120.00326.38
5.6.340.0100.00626.38
5.6.330.0120.00026.38
5.6.320.0050.00626.38
5.6.310.0080.00326.38
5.6.300.0040.00426.38
5.6.290.0060.00226.38
5.6.280.0070.00226.38
5.6.270.0070.00126.38
5.6.260.0040.00426.38
5.6.250.0030.00526.38
5.6.240.0060.00126.38
5.6.230.0050.00426.38
5.6.220.0060.00226.38
5.6.210.0020.00626.38
5.6.200.0070.00426.38
5.6.190.0050.00426.38
5.6.180.0070.00226.38
5.6.170.0050.00326.38
5.6.160.0070.00226.38
5.6.150.0000.00826.38
5.6.140.0040.00426.38
5.6.130.0020.00726.38
5.6.120.0100.00026.38
5.6.110.0050.00426.38
5.6.100.0040.00526.38
5.6.90.0080.00126.38
5.6.80.0070.00226.38
5.6.70.0040.00426.38
5.6.60.0070.00126.38
5.6.50.0030.00526.38
5.6.40.0040.00326.38
5.6.30.0060.00326.38
5.6.20.0040.00326.38
5.6.10.0060.00126.38
5.6.00.0010.00626.38
5.5.380.0100.00326.38
5.5.370.0140.00026.38
5.5.360.0140.00026.38
5.5.350.0120.00226.38
5.5.340.0090.00626.38
5.5.330.0040.01026.38
5.5.320.0130.00226.38
5.5.310.0090.00526.38
5.5.300.0130.00226.38
5.5.290.0120.00226.38
5.5.280.0120.00326.38
5.5.270.0130.00226.38
5.5.260.0100.00626.38
5.5.250.0080.00726.38
5.5.240.0110.00426.38
5.5.230.0110.00526.38
5.5.220.0110.00326.38
5.5.210.0120.00326.38
5.5.200.0100.00426.38
5.5.190.0110.00326.38
5.5.180.0120.00226.38
5.5.170.0100.00326.38
5.5.160.0050.00926.38
5.5.150.0120.00226.38
5.5.140.0130.00126.38
5.5.130.0140.00126.38
5.5.120.0110.00326.38
5.5.110.0100.00426.38
5.5.100.0130.00126.38
5.5.90.0090.00526.38
5.5.80.0150.00326.38
5.5.70.0100.00726.38
5.5.60.0100.00426.38
5.5.50.0060.00826.38
5.5.40.0140.00026.38
5.5.30.0100.00326.38
5.5.20.0100.00526.38
5.5.10.0100.00526.38
5.5.00.0130.00326.38
5.4.450.0100.00426.38
5.4.440.0100.00226.38
5.4.430.0100.00126.38
5.4.420.0040.00726.38
5.4.410.0080.00326.38
5.4.400.0060.00626.38
5.4.390.0100.00126.38
5.4.380.0140.00526.38
5.4.370.0050.00726.38
5.4.360.0090.00226.38
5.4.350.0110.00526.38
5.4.340.0130.00326.38
5.4.330.0120.00026.38
5.4.320.0100.00226.38
5.4.310.0040.00726.38
5.4.300.0090.00426.38
5.4.290.0110.00126.38
5.4.280.0130.00626.38
5.4.270.0140.00226.38
5.4.260.0090.00426.38
5.4.250.0070.00426.38
5.4.240.0120.00026.38
5.4.230.0070.00426.38
5.4.220.0090.00126.38
5.4.210.0070.00426.38
5.4.200.0080.00326.38
5.4.190.0060.00526.38
5.4.180.0090.00126.38
5.4.170.0110.00026.38
5.4.160.0090.00226.38
5.4.150.0080.00326.38
5.4.140.0110.00026.38
5.4.130.0040.00626.38
5.4.120.0080.00326.38
5.4.110.0100.00026.38
5.4.100.0090.00226.38
5.4.90.0050.00526.38
5.4.80.0040.00626.38
5.4.70.0090.00226.38
5.4.60.0090.00126.38
5.4.50.0110.00026.38
5.4.40.0090.00326.38
5.4.30.0110.00026.38
5.4.20.0060.00426.38
5.4.10.0080.00326.38
5.4.00.0040.00726.38
5.3.290.0090.00226.38
5.3.280.0100.00226.38
5.3.270.0100.00126.38
5.3.260.0110.00026.38
5.3.250.0070.00526.38
5.3.240.0110.00026.38
5.3.230.0090.00326.38
5.3.220.0080.00326.38
5.3.210.0050.00626.38
5.3.200.0080.00426.38
5.3.190.0080.00426.38
5.3.180.0070.00426.38
5.3.170.0090.00226.38
5.3.160.0090.00326.38
5.3.150.0070.00526.38
5.3.140.0110.00026.38
5.3.130.0100.00126.38
5.3.120.0070.00526.38
5.3.110.0110.00026.38
5.3.100.0070.00426.38
5.3.90.0080.00326.38
5.3.80.0110.00326.38
5.3.70.0080.00326.38
5.3.60.0070.00626.38
5.3.50.0110.00126.38
5.3.40.0090.00326.38
5.3.30.0120.00026.38
5.3.20.0060.00426.38
5.3.10.0110.00026.38
5.3.00.0090.00226.38
5.2.170.0060.00326.38
5.2.160.0090.00026.38
5.2.150.0020.00826.38
5.2.140.0040.00526.38
5.2.130.0090.00026.38
5.2.120.0070.00126.38
5.2.110.0110.00326.38
5.2.100.0060.00926.38
5.2.90.0090.00026.38
5.2.80.0090.00426.38
5.2.70.0090.00526.38
5.2.60.0080.00626.38
5.2.50.0110.00226.38
5.2.40.0080.00426.38
5.2.30.0110.00226.38
5.2.20.0100.00226.38
5.2.10.0100.00326.38
5.2.00.0120.00026.38
5.1.60.0090.00226.38
5.1.50.0090.00326.38
5.1.40.0120.00126.38
5.1.30.0100.00126.38
5.1.20.0100.00126.38
5.1.10.0110.00326.38
5.1.00.0080.00626.38
5.0.50.0040.00326.38
5.0.40.0070.00326.38
5.0.30.0090.00126.38
5.0.20.0040.00426.38
5.0.10.0060.00226.38
5.0.00.0080.00326.38
4.4.90.0030.00126.38
4.4.80.0040.00226.38
4.4.70.0040.00126.38
4.4.60.0030.00326.38
4.4.50.0060.00026.38
4.4.40.0060.00026.38
4.4.30.0040.00026.38
4.4.20.0020.00426.38
4.4.10.0020.00526.38
4.4.00.0050.00026.38
4.3.110.0060.00026.38
4.3.100.0060.00126.38
4.3.90.0030.00226.38
4.3.80.0020.00226.38
4.3.70.0020.00226.38
4.3.60.0040.00026.38
4.3.50.0020.00226.38
4.3.40.0040.00026.38
4.3.30.0000.00326.38
4.3.20.0020.00126.38
4.3.10.0010.00226.38
4.3.00.0020.00226.38

preferences:
50.53 ms | 400 KiB | 5 Q