Last active
February 6, 2022 17:15
-
-
Save snipe/5479158 to your computer and use it in GitHub Desktop.
By request, a PHP fizzbuzz that prints the numbers from 1 to 100. But for multiples of three print “Fuck You” instead of the number and for the multiples of five print “Choke on a Bag of Dicks”. For numbers which are multiples of both three and five print “Fuck You Choke on a Bag of Dicks”.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (range(1,100) as $i) | |
echo (''==($x=($i%3==0?"Fuck You ":"").($i%5==0?"Choke on a Bag of Dicks":""))?$i:$x)."\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment