3v4l.org

run code in 200+ PHP versions simultaneously
<?php $server_seed = "a304c00734c95ac40ecfc463d2441e8f9bbece7d036f482c148baee619ae5889"; $public_seed = "0705101301"; $round = "4949289"; $hash = hash('sha256', $server_seed . "-" . $public_seed . "-" . $round); $roll = hexdec(substr($hash, 0, 8)) % 15; if ($roll >= 1 and $roll <=7) $roll_colour = 'Terrorist'; elseif ($roll >= 8 and $roll <= 14) $roll_colour = 'Counter Terrorist'; echo("Roll: $roll\nColour: $roll_colour");
based on f3vgq
Output for 7.2.0 - 7.4.2
Notice: Undefined variable: roll_colour in /in/Z0rGj on line 11 Roll: 0 Colour: