3v4l.org

run code in 500+ PHP versions simultaneously
<?php /* * Fill in all three below and click the blue 'eval();' button. * ------------------ */ $server_seed = ""; $eos_hash = ""; $round_number = ""; /* ------------------ */ if ($server_seed == '' || $eos_hash === "" || $round_number == '') { echo "Fill in details"; return; } // Create HMAC-SHA256 hash $message = $eos_hash . "-" . $round_number; $hmac_hash = hash_hmac('sha256', $message, $server_seed); // Convert hex to decimal using bcmath for large numbers $decimal_value = '0'; $length = strlen($hmac_hash); for ($i = 0; $i < $length; $i++) { $decimal_value = bcmul($decimal_value, '16'); // Multiply by base 16 $decimal_value = bcadd($decimal_value, hexdec($hmac_hash[$i])); // Add the current digit } // Apply modulo 10^8 $jackpot_result = bcmod($decimal_value, '100000000'); // 10^8 = 100000000 echo "Jackpot Round: " . $jackpot_result; ?>

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.5.80.0110.00716.55
8.5.70.0030.00416.66
8.5.60.0120.00516.78
8.5.50.0120.00718.36
8.5.30.0300.01117.28
8.5.20.0380.01316.81
8.5.10.0310.01216.34
8.5.00.0360.00816.64
8.4.230.0100.01119.49
8.4.220.0060.00319.53
8.4.210.0100.01019.48
8.4.180.0140.01019.64
8.4.170.0340.00819.64
8.4.160.0370.01219.60
8.4.150.0330.01119.43
8.4.140.0330.00917.55
8.4.130.0360.00617.41
8.4.120.0340.01017.64
8.4.110.0290.01317.79
8.4.100.0400.00917.56
8.4.90.0400.00917.62
8.4.80.0420.00617.69
8.4.70.0450.00317.53
8.4.60.0410.00617.80
8.4.50.0410.00717.68
8.4.40.0410.00917.57
8.4.30.0370.01117.59
8.4.20.0420.00717.49
8.4.10.0390.01017.61
8.3.320.0110.01118.43
8.3.310.0100.00918.38
8.3.300.0400.00718.15
8.3.290.0290.01218.21
8.3.280.0290.01018.29
8.3.270.0340.00916.56
8.3.260.0360.00816.66
8.3.250.0390.00516.55
8.3.240.0330.01316.37
8.3.230.0310.01216.54
8.3.220.0400.01116.71
8.3.210.0370.00816.57
8.3.200.0310.00916.33
8.3.190.0360.00816.71
8.3.180.0370.00816.51
8.3.170.0430.01016.51
8.3.160.0430.00616.39
8.3.150.0410.00816.49
8.3.140.0370.01216.66
8.3.130.0330.01116.55
8.3.120.0360.00816.39
8.3.110.0340.00916.61
8.3.100.0400.00816.45
8.3.90.0350.01216.64
8.3.80.0400.01016.63
8.3.70.0410.00816.66
8.3.60.0350.01316.41
8.3.50.0420.01316.38
8.3.40.0340.01117.60
8.3.30.0320.00717.43
8.3.20.0250.01217.66
8.3.10.0300.01017.60
8.3.00.0250.01417.67
8.2.320.0110.01018.17
8.2.310.0140.00918.04

preferences:
47.32 ms | 750 KiB | 5 Q