Skip to content

Instantly share code, notes, and snippets.

@Alexander-0x80
Last active December 21, 2015 10:28
Show Gist options
  • Save Alexander-0x80/6291828 to your computer and use it in GitHub Desktop.
Save Alexander-0x80/6291828 to your computer and use it in GitHub Desktop.
PHP BumBam ;)
print_r( array_map(function($n) { return !($n%15) ? "BumBam" : (!($n%5) ? "Bam" : (!($n%3) ? "Bum" : $n)); },range(1,100)) );
@vkuper
Copy link

vkuper commented Aug 21, 2013

for($i=1;$i<=100;$i++) {$set[]=(!($i%15)?'BumBam':(!($i%3)?'Bum':(!($i%5)?'Bam':$i)));}
print_r($set);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment