Created
January 7, 2014 01:32
-
-
Save L-P/7dd2714704bd3a47f0c7 to your computer and use it in GitHub Desktop.
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
<?php | |
$f = function($a) { | |
switch(0) { | |
case $a % 15: | |
return 'FizzBuzz'; | |
case $a % 3: | |
return 'Fizz'; | |
case $a % 5: | |
return 'Buzz'; | |
default: | |
return $a; | |
} | |
}; | |
array_map('printf', array_map($f, range(0, $argv[1]))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment