3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $b= 1; $k =0 ; for($i=1; $i<=5; $i++) { echo "Data ".$i." To user ".$b."<br>\n"; if($b == 3 && $k == 1) { $b--;$k--; } else { if($b == 3) $k++; if($b != 3) $b++; } }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Data 1 To user 1<br> Data 2 To user 2<br> Data 3 To user 3<br> Data 4 To user 3<br> Data 5 To user 2<br>