3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for($i=1;$i<31;$i++) { if($i%3 == 0 && $i % 5 != 0) echo "foo"; else if($i%5 == 0 && $i % 3 != 0) echo "bar"; else if($i % 5 == 0 && $i % 3 == 0) echo "foobar"; else echo $i; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
12foo4barfoo78foobar11foo1314foobar1617foo19barfoo2223foobar26foo2829foobar