3v4l.org

run code in 300+ PHP versions simultaneously
<?php $salt = "fe5e5c41b"; $roll_id = 2; for($i = 0; $i < 1000; $i++) { echo generateRandomNumber(md5(uniqid(rand(), true)), $salt, 0) . "\r\n"; } function generateRandomNumber(string $seed, string $salt, int $roll): int { $roll_hash = hash("sha256", $seed . "-" . $salt . "-" . $roll); $roll_hash_first16 = substr($roll_hash, 0, 16); return abs(hexdec($roll_hash_first16) % 37); }

Abusive script

This script was stopped while abusing our resources


preferences:
22.79 ms | 410 KiB | 5 Q