3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for ($i=1; $i<=100; $i++) { if($i%2 == 0) { echo "fizz"; } if ($i%3 == 0) { echo "buzz"; } if (!($i%2 == 0 || $i%3 == 0)) { echo $i; } echo "\n"; }
based on 2b9iQ
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1 fizz buzz fizz 5 fizzbuzz 7 fizz buzz fizz 11 fizzbuzz 13 fizz buzz fizz 17 fizzbuzz 19 fizz buzz fizz 23 fizzbuzz 25 fizz buzz fizz 29 fizzbuzz 31 fizz buzz fizz 35 fizzbuzz 37 fizz buzz fizz 41 fizzbuzz 43 fizz buzz fizz 47 fizzbuzz 49 fizz buzz fizz 53 fizzbuzz 55 fizz buzz fizz 59 fizzbuzz 61 fizz buzz fizz 65 fizzbuzz 67 fizz buzz fizz 71 fizzbuzz 73 fizz buzz fizz 77 fizzbuzz 79 fizz buzz fizz 83 fizzbuzz 85 fizz buzz fizz 89 fizzbuzz 91 fizz buzz fizz 95 fizzbuzz 97 fizz buzz fizz