3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fizzBuzz($n) { if ($n % 3) echo "Fizz"; if ($n % 5) echo "Buzz"; echo "\n"; } foreach (range(1,100) as $n) fizzBuzz($n);
Output for 4.3.0 - 7.3.0rc4
FizzBuzz FizzBuzz Buzz FizzBuzz Fizz Buzz FizzBuzz FizzBuzz Buzz Fizz FizzBuzz Buzz FizzBuzz FizzBuzz FizzBuzz FizzBuzz Buzz FizzBuzz Fizz Buzz FizzBuzz FizzBuzz Buzz Fizz FizzBuzz Buzz FizzBuzz FizzBuzz FizzBuzz FizzBuzz Buzz FizzBuzz Fizz Buzz FizzBuzz FizzBuzz Buzz Fizz FizzBuzz Buzz FizzBuzz FizzBuzz FizzBuzz FizzBuzz Buzz FizzBuzz Fizz Buzz FizzBuzz FizzBuzz Buzz Fizz FizzBuzz Buzz FizzBuzz FizzBuzz FizzBuzz FizzBuzz Buzz FizzBuzz Fizz Buzz FizzBuzz FizzBuzz Buzz Fizz FizzBuzz Buzz FizzBuzz FizzBuzz FizzBuzz FizzBuzz Buzz FizzBuzz Fizz Buzz FizzBuzz FizzBuzz Buzz Fizz FizzBuzz Buzz FizzBuzz FizzBuzz FizzBuzz FizzBuzz Buzz FizzBuzz Fizz Buzz FizzBuzz FizzBuzz Buzz Fizz