daviddoran / fizzbuzz

A Collection of FizzBuzz Solutions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A Collection of FizzBuzz Solutions


Languages

Language:PHP 100.0%