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)) % 1000; 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.4.20.0090.00619.89
8.4.10.0080.01223.70
8.3.150.0070.00718.94
8.3.140.0130.00619.05
8.3.130.0080.00018.57
8.3.120.0100.00018.86
8.3.110.0080.00020.94
8.3.100.0000.00824.06
8.3.90.0030.00626.77
8.3.80.0040.00416.75
8.3.70.0140.00316.61
8.3.60.0210.00016.38
8.3.50.0160.00320.07
8.3.40.0030.01420.09
8.3.30.0110.00418.71
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0000.00726.16
8.2.260.0110.00716.72
8.2.250.0080.00016.38
8.2.240.0080.00017.03
8.2.230.0030.00622.58
8.2.220.0160.00337.54
8.2.210.0080.00026.77
8.2.200.0040.00418.41
8.2.190.0120.00318.54
8.2.180.0060.00925.92
8.2.170.0060.00922.96
8.2.160.0070.01122.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00818.75
8.2.110.0000.01119.27
8.2.100.0090.00317.91
8.2.90.0080.00019.07
8.2.80.0080.00017.97
8.2.70.0040.00817.50
8.2.60.0000.00817.80
8.2.50.0060.00318.07
8.2.40.0000.00718.22
8.2.30.0000.00717.94
8.2.20.0030.00522.45
8.2.10.0050.00218.19
8.2.00.0040.00419.18
8.1.310.0060.00316.70
8.1.300.0100.00018.01
8.1.290.0060.00330.84
8.1.280.0140.00025.92
8.1.270.0070.01322.08
8.1.260.0040.00828.09
8.1.250.0040.00428.09
8.1.240.0030.00619.07
8.1.230.0070.00417.42
8.1.220.0000.00817.75
8.1.210.0060.00318.77
8.1.200.0000.01017.35
8.1.190.0050.00317.25
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0000.00818.90
8.1.150.0000.00718.67
8.1.140.0030.00517.37
8.1.130.0070.00017.45
8.1.120.0160.00018.61
8.1.110.0090.00618.69
8.1.100.0120.00518.76
8.1.90.0080.00818.73
8.1.80.0120.00318.70
8.1.70.0050.01018.64
8.1.60.0130.00418.76
8.1.50.0110.00618.61
8.1.40.0140.00318.73
8.1.30.0140.00518.88
8.1.20.0050.01418.81
8.1.10.0200.00018.70
8.1.00.0090.00918.69
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0000.00718.49
8.0.270.0070.00018.14
8.0.260.0000.00716.75
8.0.250.0100.00318.15
8.0.240.0120.00318.04
8.0.230.0110.00418.00
8.0.220.0120.00318.01
8.0.210.0140.00017.93
8.0.200.0070.00717.99
8.0.190.0110.00318.02
8.0.180.0070.00818.16
8.0.170.0110.00318.04
8.0.160.0070.00717.99
8.0.150.0070.00718.12
8.0.140.0090.00517.93
8.0.130.0140.00018.07
8.0.120.0090.00517.96
8.0.110.0110.00317.99
8.0.100.0060.00918.06
8.0.90.0090.00618.05
8.0.80.0100.00518.05
8.0.70.0090.00518.02
8.0.60.0000.01417.96
8.0.50.0050.01018.05
8.0.30.0160.00017.98
8.0.20.0000.01118.00
8.0.10.0110.00018.04
7.4.330.0000.00713.98
7.4.320.0050.00517.70
7.4.300.0080.00317.58
7.4.290.0060.00317.43
7.4.280.0100.00017.39
7.4.270.0060.00617.68
7.4.260.0030.00617.36
7.4.250.0030.00617.62
7.4.240.0070.00217.57
7.4.230.0000.01117.63
7.4.220.0060.00317.76
7.4.210.0000.01017.39
7.4.200.0050.00517.49
7.4.190.0000.01017.41
7.4.180.0050.00617.70
7.4.160.0080.00217.72
7.4.150.0050.00517.34
7.4.140.0110.00017.55
7.4.130.0080.00317.63
7.4.120.0050.00517.59
7.4.110.0070.00317.25
7.4.100.0070.00317.67
7.4.90.0100.00017.55
7.4.80.0020.00817.57
7.4.70.0070.00417.54
7.4.60.0120.00017.39
7.4.50.0090.00317.38
7.4.40.0060.00617.37
7.4.30.0100.00017.58
7.4.20.0100.00017.41
7.4.10.0030.00717.55
7.4.00.0070.00317.25

preferences:
31.72 ms | 403 KiB | 5 Q