3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Fill in all five below and click blue 'eval();' button below textarea. * * ------------------ */ $server_seed_hash = ''; #SHA-256 Server SEED $server_seed = ''; #Server SEED $client_seed = ''; #Client SEED $nonce = ''; #NONCE /* ------------------ */ if ($server_seed_hash == '' || $server_seed == '' || $client_seed == '' || $nonce == '') exit("Fill in details"); $server_seed_sha256 = hash('sha256', $server_seed); $hash = hash('sha256', $server_seed.'|'.$client_seed.'|'.$nonce); $num = hexdec(substr($hash, 0, 8)) % 6 + 1; echo "Hash matches: ".($server_seed_hash == $server_seed_sha256 ? 'Yes': 'No')."\n"; echo "Generated number: $num";

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.140.0040.00416.43
8.3.130.0080.00018.56
8.3.120.0060.00319.10
8.3.110.0000.00920.94
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0060.00316.75
8.3.70.0120.00616.58
8.3.60.0040.01216.75
8.3.50.0130.00718.30
8.3.40.0040.01118.63
8.3.30.0120.00318.71
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.250.0040.00416.95
8.2.240.0080.00022.38
8.2.230.0060.00322.58
8.2.220.0040.01137.54
8.2.210.0040.00426.77
8.2.200.0030.00916.63
8.2.190.0100.01016.58
8.2.180.0040.01125.92
8.2.170.0070.00722.96
8.2.160.0100.00722.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0040.00420.70
8.2.110.0040.00421.07
8.2.100.0080.00417.72
8.2.90.0000.00818.03
8.2.80.0060.00317.97
8.2.70.0000.00817.77
8.2.60.0000.00817.75
8.2.50.0040.00717.75
8.2.40.0090.00019.66
8.2.30.0100.00018.06
8.2.20.0040.00420.48
8.2.10.0040.00417.82
8.2.00.0000.00819.37
8.1.300.0060.00318.05
8.1.290.0040.01118.88
8.1.280.0140.00325.92
8.1.270.0020.00523.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.01317.13
8.1.230.0000.01222.50
8.1.220.0060.00317.74
8.1.210.0030.00719.04
8.1.200.0040.00417.48
8.1.190.0040.00417.38
8.1.180.0050.00318.10
8.1.170.0050.00217.63
8.1.160.0040.00418.92
8.1.150.0050.00318.63
8.1.140.0040.00417.38
8.1.130.0000.00719.22
8.1.120.0060.00317.45
8.1.110.0040.00417.33
8.1.100.0040.00417.41
8.1.90.0030.00317.31
8.1.80.0000.01017.41
8.1.70.0030.00317.44
8.1.60.0080.00017.47
8.1.50.0000.00817.42
8.1.40.0060.00617.54
8.1.30.0040.00417.54
8.1.20.0040.00417.56
8.1.10.0000.00817.37
8.1.00.0000.00817.43
8.0.300.0030.00620.03
8.0.290.0090.00316.75
8.0.280.0000.00818.35
8.0.270.0070.00017.19
8.0.260.0000.00718.48
8.0.250.0050.00216.88
8.0.240.0000.00816.99
8.0.230.0030.00317.04
8.0.220.0000.00716.79
8.0.210.0000.00716.93
8.0.200.0080.00017.04
8.0.190.0000.00817.02
8.0.180.0040.00417.02
8.0.170.0030.00616.91
8.0.160.0060.00616.90
8.0.150.0050.00216.93
8.0.140.0000.00816.88
8.0.130.0050.00216.80
8.0.120.0040.00416.84
8.0.110.0040.00416.96
8.0.100.0000.00716.82
8.0.90.0000.00816.98
8.0.80.0000.00716.78
8.0.70.0040.00416.88
8.0.60.0040.00416.80
8.0.50.0040.00416.84
8.0.30.0070.00016.93
8.0.20.0000.00716.86
8.0.10.0040.00416.96
7.4.330.0000.00515.55
7.4.320.0000.00716.45
7.4.300.0060.00016.40
7.4.290.0040.00416.36
7.4.280.0000.00816.50
7.4.270.0050.00216.34
7.4.260.0030.00316.38
7.4.250.0000.00716.50
7.4.240.0070.00016.38
7.4.230.0000.00716.50
7.4.220.0030.00316.58
7.4.210.0030.00316.37
7.4.200.0030.00316.58
7.4.190.0000.00716.61
7.4.180.0040.00416.46
7.4.160.0030.00316.60
7.4.150.0000.00716.50
7.4.140.0000.00716.31
7.4.130.0000.00616.43
7.4.120.0040.00416.50
7.4.110.0070.00016.33
7.4.100.0070.00016.58
7.4.90.0000.00716.52
7.4.80.0040.00416.44
7.4.70.0000.00716.37
7.4.60.0030.00316.43
7.4.50.0000.00816.35
7.4.40.0030.00316.32
7.4.30.0040.00416.42
7.4.20.0000.00716.50
7.4.10.0000.00716.45
7.4.00.0070.00016.38

preferences:
56.58 ms | 403 KiB | 5 Q