3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php for ($i = 0; $i <= 30; $i++) { if ($i % 3 == 0 && $i % 5 == 0) { echo "$i: FizzBuzz; "; } elseif ($i % 3 == 0) { echo "$i: Fizz; "; } elseif ($i % 5 == 0) { echo "$i: Buzz; "; } }
based on AoMOk
Output for 4.3.0 - 7.1.7
0: FizzBuzz; 3: Fizz; 5: Buzz; 6: Fizz; 9: Fizz; 10: Buzz; 12: Fizz; 15: FizzBuzz; 18: Fizz; 20: Buzz; 21: Fizz; 24: Fizz; 25: Buzz; 27: Fizz; 30: FizzBuzz;