3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Fill Server seed $server_seed = ""; // Fill Public seed $public_seed = ""; // Fill Round Number $round = ""; //---------------- if ($server_seed !== "" && $public_seed !== "" && $round !== "") { $hash = hash('sha256', $server_seed . "-" . $public_seed . "-" . $round); $roll = hexdec(substr($hash, 0, 8)) % 15; if ($roll === 0) { $roll_colour = 'Dice'; } elseif ($roll <= 7) { $roll_colour = 'T'; } else { $roll_colour = 'CT'; } echo "Roll: $roll\n"; echo "Win: $roll_colour\n"; } else { echo "Please fill in the initial variables: \$server_seed, \$public_seed, and \$round.\n"; }
Output for git.master, git.master_jit
Please fill in the initial variables: $server_seed, $public_seed, and $round.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
50.76 ms | 405 KiB | 5 Q