3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = "62afb1631cdf2a4b4e3b33690bd153aca604c59041bb487a0ff623235dc93698"; $round_id = "27634"; $hash = hash("sha256",$server_seed."-".$round_id); $roll = hexdec(substr($hash,0,8)) % 15; echo "Round $round_id = $roll";

preferences:
62.39 ms | 402 KiB | 5 Q