3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = "39b7d32fcb743c244c569a56d6de4dc27577d6277d6cf155bdcba6d05befcb34"; $lotto = "0422262831"; $round_id = "1"; $hash = hash("sha256",$server_seed."-".$lotto."-".$round_id); $roll = hexdec(substr($hash,0,8)) % 37; // Print værdien af $hash print("\$hash = $hash\n"); // Print værdien af substr($hash,0,8) print("substr(\$hash,0,8) = ".(String)substr($hash,0,8)."\n"); // Print værdien af hexdec(substr($hash,0,8)) print("hexdec(856672a7) = ".(String)hexdec(substr($hash,0,8))."\n"); // Print værdien af 856672a7 % 15 print("2238083751 % 37 = ".(2238083751 % 37)."\n"); // Print værdien af roll print("\$roll = $roll"); ?>

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.00318.20
8.3.50.0060.00916.49
8.3.40.0060.00918.62
8.3.30.0150.00418.45
8.3.20.0090.00018.68
8.3.10.0050.00319.72
8.3.00.0040.00419.14
8.2.180.0120.00418.04
8.2.170.0070.01722.96
8.2.160.0070.00719.08
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.84
8.2.110.0060.00320.44
8.2.100.0060.00617.72
8.2.90.0000.00819.22
8.2.80.0030.00617.97
8.2.70.0040.00417.46
8.2.60.0000.00818.04
8.2.50.0050.00318.10
8.2.40.0040.00420.59
8.2.30.0000.00720.50
8.2.20.0000.00917.66
8.2.10.0000.00818.04
8.2.00.0080.00018.02
8.1.280.0040.01125.92
8.1.270.0040.00423.97
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00323.85
8.1.230.0110.00020.93
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0040.00418.51
8.1.160.0040.00419.02
8.1.150.0070.00018.87
8.1.140.0080.00219.57
8.1.130.0030.00517.80
8.1.120.0000.00717.52
8.1.110.0040.00417.48
8.1.100.0040.00417.39
8.1.90.0060.00317.37
8.1.80.0000.00817.36
8.1.70.0030.00317.43
8.1.60.0080.00017.54
8.1.50.0040.00417.56
8.1.40.0040.00417.41
8.1.30.0030.00517.71
8.1.20.0000.00817.55
8.1.10.0000.00817.33
8.1.00.0040.00417.47
8.0.300.0040.00418.77
8.0.290.0040.00416.58
8.0.280.0030.00318.50
8.0.270.0000.00717.21
8.0.260.0030.00317.13
8.0.250.0070.00016.95
8.0.240.0000.00716.92
8.0.230.0080.00016.96
8.0.220.0040.00416.89
8.0.210.0030.00316.76
8.0.200.0030.00316.89
8.0.190.0040.00416.79
8.0.180.0030.00416.80
8.0.170.0040.00416.82
8.0.160.0080.00016.98
8.0.150.0050.00216.91
8.0.140.0050.00316.86
8.0.130.0000.00613.30
8.0.120.0080.00016.91
8.0.110.0070.00016.75
8.0.100.0080.00016.85
8.0.90.0040.00416.86
8.0.80.0090.01216.94
8.0.70.0000.00716.93
8.0.60.0070.00016.79
8.0.50.0000.00716.76
8.0.30.0110.00616.99
8.0.20.0080.01217.40
8.0.10.0050.00216.80
8.0.00.0150.00616.76
7.4.330.0000.00515.08
7.4.320.0000.00616.53
7.4.300.0000.00616.52
7.4.290.0040.00416.59
7.4.280.0040.00416.50
7.4.270.0050.00316.43
7.4.260.0000.00716.46
7.4.250.0000.00816.39
7.4.240.0070.00016.40
7.4.230.0030.00316.64
7.4.220.0190.00616.55
7.4.210.0140.00016.47
7.4.200.0040.00416.58
7.4.160.0100.00716.54
7.4.150.0130.00617.40
7.4.140.0090.00917.86
7.4.130.0080.01016.54
7.4.120.0120.00516.56
7.4.110.0120.00616.52
7.4.100.0120.00616.64
7.4.90.0180.00616.59
7.4.80.0100.01019.39
7.4.70.0000.01516.61
7.4.60.0060.00916.57
7.4.50.0040.00816.53
7.4.40.0140.00416.55
7.4.30.0110.00816.35
7.4.00.0080.01114.92
7.3.330.0030.00313.16
7.3.320.0030.00313.16
7.3.310.0040.00416.15
7.3.300.0000.00716.16
7.3.290.0070.00916.37
7.3.280.0080.00916.32
7.3.270.0000.01717.40
7.3.260.0150.00916.52
7.3.250.0080.01216.42
7.3.240.0050.01116.48
7.3.230.0080.00916.39
7.3.210.0070.01016.54
7.3.200.0060.00916.52
7.3.190.0060.01216.34
7.3.180.0150.00016.40
7.3.170.0100.00716.31
7.3.160.0090.00916.48
7.3.120.0070.01015.14
7.3.110.0090.00714.59
7.3.100.0070.01014.85
7.3.90.0060.00914.76
7.3.80.0140.00014.92
7.3.70.0110.00314.97
7.3.60.0080.00814.71
7.3.50.0000.01214.82
7.3.40.0060.01214.89
7.3.30.0060.00614.87
7.3.20.0040.00816.57
7.3.10.0080.00416.40
7.3.00.0030.01016.61
7.2.330.0150.00416.78
7.2.320.0090.00916.77
7.2.310.0190.00316.43
7.2.300.0060.01216.62
7.2.290.0090.00616.61
7.2.250.0090.00615.34
7.2.240.0070.01115.09
7.2.230.0000.01715.03
7.2.220.0030.01314.94
7.2.210.0170.00015.21
7.2.200.0030.00615.24
7.2.190.0040.01214.91
7.2.180.0030.01415.17
7.2.170.0080.00415.08
7.2.00.0000.01819.46
7.1.330.0040.01115.98
7.1.320.0030.01416.00
7.1.310.0110.00315.63
7.1.300.0060.00615.85
7.1.290.0070.01015.86
7.1.280.0120.00615.58
7.1.270.0060.00615.53
7.1.260.0030.00915.86
7.1.200.0150.00315.54
7.1.100.0060.00618.05
7.1.70.0090.00317.30
7.1.60.0130.01320.41
7.1.00.0070.07022.31
7.0.200.0170.00316.67
7.0.60.0130.07721.84
7.0.50.0170.07020.48
7.0.40.0230.07020.36
7.0.30.0200.08720.45
7.0.20.0100.06720.35
7.0.10.0130.05720.34
7.0.00.0230.06320.28
5.6.280.0100.06720.92
5.6.210.0170.05320.72
5.6.200.0070.07018.08
5.6.190.0070.06321.02
5.6.180.0130.06321.15
5.6.170.0130.05721.11
5.6.160.0130.07321.10
5.6.150.0130.06320.94
5.6.140.0200.05721.13
5.6.130.0300.05021.15
5.6.120.0100.06321.05
5.6.110.0200.05721.04
5.6.100.0300.08721.08
5.6.90.0170.05720.99
5.6.80.0330.05320.43
5.6.70.0230.07020.42
5.6.60.0430.06020.42
5.6.50.0270.07720.47
5.6.40.0300.06020.49
5.6.30.0330.08020.51
5.6.20.0370.05320.48
5.6.10.0330.05320.43
5.6.00.0430.04720.36
5.5.350.0130.04320.46
5.5.340.0100.07317.92
5.5.330.0200.07020.88
5.5.320.0130.08320.91
5.5.310.0200.05320.84
5.5.300.0230.06720.93
5.5.290.0170.06020.80
5.5.280.0230.05320.89
5.5.270.0030.07320.92
5.5.260.0230.06721.00
5.5.250.0330.06320.61
5.5.240.0300.05720.27
5.5.230.0300.05720.21
5.5.220.0270.06020.21
5.5.210.0400.07720.26
5.5.200.0470.05320.15
5.5.190.0200.05320.16
5.5.180.0400.05320.18
5.5.160.0370.04720.36
5.5.150.0430.04320.28
5.5.140.0330.05720.20
5.5.130.0230.05720.22
5.5.120.0330.06320.23
5.5.110.0330.04720.04
5.5.100.0100.06020.15
5.5.90.0230.05020.11
5.5.80.0070.05719.93
5.5.70.0270.05720.10
5.5.60.0170.06720.11
5.5.50.0330.05020.14
5.5.40.0300.04720.10
5.5.30.0400.05320.25
5.5.20.0330.05720.10
5.5.10.0300.06020.16
5.5.00.0200.06320.07

preferences:
56.37 ms | 400 KiB | 5 Q