3v4l.org

run code in 200+ PHP versions simultaneously
<?php $server_seed = "32bccabef07008b4414442254a28a30f639f929450e4fdcd1f6438c8e47ea724"; $public_seed = "2219293212"; $round = "5041863"; $hash = hash('sha256', $server_seed . "-" . $public_seed . "-" . $round); $roll = hexdec(substr($hash, 0, 8)) % 15; if ($roll == 0) $roll_colour = 'bonus'; elseif ($roll >= 1 and $roll <= 7) $roll_colour = 'orange'; elseif ($roll >= 8 and $roll <= 14) $roll_colour = 'black'; echo("Roll: $roll\nColour: $roll_colour");
based on 7gg4D
Output for 7.2.0 - 7.4.4
Roll: 8 Colour: black