3v4l.org

run code in 200+ 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 - 7.2.6
12foo4barfoo78foobar11foo1314foobar1617foo19barfoo2223foobar26foo2829foobar