3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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";
based on sjCDq
Output for 5.5.0 - 7.3.0rc3
Round 27634 = 1