3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = "63a7db0259ce35e50eb0949e279c420c9fffcff37278e1ae04fea329a7ffeec4"; $public_seed = ""; $round = "6472800"; $hash = hash('sha256', $server_seed . "-" . $public_seed . "-" . $round); $roll = hexdec(substr($hash, 0, 8)) % 15; if ($roll == 0) $roll_colour == 'bonus'; echo("Roll: $roll\nColour: $roll_colour");
Output for 8.0.0 - 8.0.8
Warning: Undefined variable $roll_colour in /in/dDs8G on line 10 Roll: 6 Colour:
Output for 7.3.0 - 7.3.29, 7.4.0 - 7.4.21
Notice: Undefined variable: roll_colour in /in/dDs8G on line 10 Roll: 6 Colour:

preferences:
62.23 ms | 460 KiB | 5 Q