3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fizzBuzz($n) { echo "\n"; if ($n % 3 == 0) echo "Fizz"; if ($n % 5 == 0) echo "Buzz"; return $n; } foreach (range(1,100) as $n) echo fizzBuzz($n);
Output for 4.3.0 - 7.2.0
1 2 Fizz3 4 Buzz5 Fizz6 7 8 Fizz9 Buzz10 11 Fizz12 13 14 FizzBuzz15 16 17 Fizz18 19 Buzz20 Fizz21 22 23 Fizz24 Buzz25 26 Fizz27 28 29 FizzBuzz30 31 32 Fizz33 34 Buzz35 Fizz36 37 38 Fizz39 Buzz40 41 Fizz42 43 44 FizzBuzz45 46 47 Fizz48 49 Buzz50 Fizz51 52 53 Fizz54 Buzz55 56 Fizz57 58 59 FizzBuzz60 61 62 Fizz63 64 Buzz65 Fizz66 67 68 Fizz69 Buzz70 71 Fizz72 73 74 FizzBuzz75 76 77 Fizz78 79 Buzz80 Fizz81 82 83 Fizz84 Buzz85 86 Fizz87 88 89 FizzBuzz90 91 92 Fizz93 94 Buzz95 Fizz96 97 98 Fizz99 Buzz100