3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Fill in all five below and click blue 'Something is wrong();' button below textarea. * * ------------------ */ $hash = ''; #Round number hash SHA256 $secret = ''; #Round number $number = ''; #Round number $tickets = ''; #Round total tickets /* ------------------ */ if ($hash == '' || $secret == '' || $number == ''|| $tickets == '') exit("Fill in details"); $sha256 = hash('sha256', $number.'|'.$secret); $ticket = ceil(intval($tickets)*floatval($number)); echo "Hash matches: ".($hash == $sha256 ? 'Yes': 'No')."\n"; echo "Winning ticket: ".$ticket."\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.4.20.0050.00318.92
8.4.10.0000.01617.55
8.3.140.0000.00816.72
8.3.130.0070.01418.21
8.3.120.0040.00420.57
8.3.110.0000.00820.94
8.3.100.0060.00316.79
8.3.90.0150.00326.77
8.3.80.0040.00416.75
8.3.70.0140.00716.58
8.3.60.0090.00616.75
8.3.50.0100.01016.36
8.3.40.0110.00418.76
8.3.30.0150.00018.69
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0040.00726.16
8.2.260.0140.00318.35
8.2.250.0000.00818.68
8.2.240.0160.00018.72
8.2.230.0130.00622.58
8.2.220.0090.00037.54
8.2.210.0100.00026.77
8.2.200.0090.00016.88
8.2.190.0120.00316.88
8.2.180.0060.00925.92
8.2.170.0110.00318.91
8.2.160.0140.00022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.83
8.2.110.0060.00320.92
8.2.100.0040.00717.91
8.2.90.0050.00317.63
8.2.80.0060.00318.83
8.2.70.0080.00017.75
8.2.60.0100.00018.03
8.2.50.0080.00018.10
8.2.40.0090.00021.07
8.2.30.0000.00719.27
8.2.20.0000.00718.07
8.2.10.0030.00319.24
8.2.00.0070.00019.32
8.1.310.0060.00318.56
8.1.300.0060.00316.27
8.1.290.0030.00618.88
8.1.280.0120.00325.92
8.1.270.0050.00224.66
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0050.00522.14
8.1.230.0070.00322.75
8.1.220.0080.00018.69
8.1.210.0080.00018.77
8.1.200.0090.00017.35
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0040.00418.46
8.1.160.0040.00418.81
8.1.150.0050.00218.91
8.1.140.0030.00318.90
8.1.130.0000.00719.22
8.1.120.0040.00417.38
8.1.110.0040.00417.53
8.1.100.0070.00017.45
8.1.90.0000.00717.43
8.1.80.0070.00317.36
8.1.70.0030.00317.49
8.1.60.0000.00817.45
8.1.50.0040.00417.54
8.1.40.0070.00017.57
8.1.30.0000.00817.67
8.1.20.0050.00517.61
8.1.10.0080.00017.52
8.1.00.0000.00717.45
8.0.300.0080.00019.88
8.0.290.0030.00516.75
8.0.280.0030.00318.37
8.0.270.0000.00716.88
8.0.260.0030.00316.89
8.0.250.0070.00017.04
8.0.240.0000.00717.07
8.0.230.0000.00817.07
8.0.220.0080.00016.96
8.0.210.0030.00316.94
8.0.200.0030.00317.05
8.0.190.0050.00217.07
8.0.180.0040.00416.84
8.0.170.0060.00317.01
8.0.160.0070.00017.04
8.0.150.0070.00016.98
8.0.140.0000.00716.82
8.0.130.0030.00313.35
8.0.120.0040.00416.89
8.0.110.0040.00417.03
8.0.100.0000.00816.90
8.0.90.0030.00316.95
8.0.80.0040.01116.88
8.0.70.0050.00217.07
8.0.60.0040.00416.84
8.0.50.0040.00416.84
8.0.30.0110.00617.02
8.0.20.0140.00316.95
8.0.10.0060.00917.13
8.0.00.0040.01117.07
7.4.330.0020.00215.55
7.4.320.0060.00016.52
7.4.300.0000.00616.64
7.4.290.0000.00716.48
7.4.280.0030.00416.46
7.4.270.0030.00316.44
7.4.260.0000.00813.29
7.4.250.0070.00016.50
7.4.240.0000.00716.54
7.4.230.0050.00416.26
7.4.220.0030.00316.53
7.4.210.0100.00416.63
7.4.200.0000.00716.68
7.4.160.0030.01016.68
7.4.150.0070.01316.60
7.4.140.0090.00616.44
7.4.130.0000.01416.55
7.4.120.0130.00616.45
7.4.110.0170.00016.42
7.4.100.0120.00316.44
7.4.90.0100.01016.50
7.4.80.0220.01116.45
7.4.70.0080.01216.49
7.4.60.0110.00716.53
7.4.50.0090.01316.36
7.4.40.0110.01116.31
7.4.30.0140.00716.39
7.4.20.0030.01716.33
7.4.10.0050.01916.30
7.4.00.0160.00416.61
7.3.330.0030.00316.18
7.3.320.0050.00013.14
7.3.310.0040.00316.16
7.3.300.0070.00016.06
7.3.290.0080.00816.27
7.3.280.0030.01016.29
7.3.270.0050.00816.25
7.3.260.0030.01416.28
7.3.250.0000.01916.36
7.3.240.0100.00316.20
7.3.230.0080.00516.32
7.3.220.0060.01616.24
7.3.210.0320.00616.31
7.3.200.0170.00716.23
7.3.190.0140.01016.24
7.3.180.0030.01416.18
7.3.170.0150.00716.22
7.3.160.0120.00916.25
7.3.150.0160.00616.16
7.3.140.0200.00016.22
7.3.130.0120.00916.16
7.3.120.0060.01516.18
7.3.110.0170.00516.16
7.3.100.0130.00516.09
7.3.90.0090.01216.45
7.3.80.0080.01416.16
7.3.70.0090.01316.43
7.3.60.0150.00416.42
7.3.50.0140.00416.33
7.3.40.0090.00916.21
7.3.30.0090.01016.30
7.3.20.0180.00416.29
7.3.10.0140.00716.28
7.3.00.0170.00016.28

preferences:
31.25 ms | 403 KiB | 5 Q