/fizzbuzz

A Collection of FizzBuzz Solutions

Primary LanguagePHP

A Collection of FizzBuzz Solutions

The classic straightforward PHP solution.

Uses a switch statement and the PHP >= 5.4 short array syntax.

Uses a for loop with no body.

Maps a function over a range.

Testing

To test a PHP solution:

php test.php php/switch.php

To test the output of any command:

./your-command-here | php test.php