3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = "96f3e04d221ca1b2048cc3b3b844e479f2bd9c80a870628072ee98fd1aa83cd0"; $public_seed = "460670512935"; $round = "5778317"; $hash = hash('sha256', $server_seed . "70248a649cb6e9fac3cc3fb8d1a407da8a140e4352639b5d82e1689ecb2e8a8e" . $public_seed . "1515301215" . $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 Ooto0
Output for 7.3.0 - 7.3.26, 7.4.0 - 7.4.13, 8.0.0
Roll: 14 Colour: black