Here is a line of PHP that deals a card from a tarot deck. It is wrong.
$card = ord(random_bytes(1)) % 78;
Enter fullscreen mode
Exit fullscreen mode
Not wrong in the way a linter finds. It returns a number between 0 and 77 every single time. It never throws. Every test you would think to write about it passes: the range is right, the values are distinct, the distribution looks fine if you eyeball a hundred draws.






