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 "</br>foo"; else if($i%5 == 0 && $i % 3 != 0) echo "</br>bar"; else if($i % 5 == 0 && $i % 3 == 0) echo "foobar"; else echo "<br>".$i; }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
<br>1<br>2</br>foo<br>4</br>bar</br>foo<br>7<br>8</br>foo</br>bar<br>11</br>foo<br>13<br>14foobar<br>16<br>17</br>foo<br>19</br>bar</br>foo<br>22<br>23</br>foo</br>bar<br>26</br>foo<br>28<br>29foobar
Output for hhvm-3.10.0

Process exited with code 153.